Skip to content

Promote preview/1.0 to release/1.0#245

Open
github-actions[bot] wants to merge 2187 commits intorelease/1.0from
preview/1.0
Open

Promote preview/1.0 to release/1.0#245
github-actions[bot] wants to merge 2187 commits intorelease/1.0from
preview/1.0

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Apr 21, 2026

Description

Automated branch promotion merging 2,184 commits from preview/1.0 into release/1.0. This PR represents the culmination of all development and preview changes and prepares them for official release.

Scope

Workflow & CI/CD Improvements
• Fixed release workflow bugs related to tag creation, git permissions, and GitHub release generation
• Added branch locking mechanism to prevent race conditions during automated back-merges
• Enhanced branch protection coordination across develop/1.0 → preview/1.0 → release/1.0 promotion pipeline
• Fixed shallow checkout issues in promote-branch workflow
• Corrected permission scoping for pull request creation in release workflows

Documentation Enhancements
• Improved API reference organization with versioned snapshots
• Fixed broken navigation links in documentation landing pages
• Implemented proper version switcher URL handling
• Enhanced getting-started guide accessibility
• Added released versions table for better version discovery

Code Quality & Performance
• Removed SIMD validation code in favor of optimized single-pass loop implementation
• Repository cleanup and maintenance

Bug Fixes
• Fixed GitHub Actions composite action quoting bugs
• Corrected environment variable references in release workflows
• Resolved merge conflict handling across branch streams

petesramek and others added 30 commits September 11, 2025 18:58
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pete Sramek <me@petesramek.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pete Sramek <petr.sramek@dropoutcoder.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pete Sramek <me@petesramek.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pete Sramek <petr.sramek@dropoutcoder.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pete Sramek <me@petesramek.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pete Sramek <petr.sramek@dropoutcoder.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pete Sramek <me@petesramek.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pete Sramek <petr.sramek@dropoutcoder.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pete Sramek <me@petesramek.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pete Sramek <petr.sramek@dropoutcoder.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pete Sramek <me@petesramek.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pete Sramek <petr.sramek@dropoutcoder.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Pete Sramek <me@petesramek.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pete Sramek <petr.sramek@dropoutcoder.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
petesramek and others added 30 commits April 4, 2026 10:17
…add released versions table (#175)

## Summary

Previously, versioned folders contained only API reference YAMLs while
guide pages were global (unversioned). The root `index.md` had entirely
broken links. The version switcher navigated to a bare `/{ver}/` folder
that has no `index.html`, causing 404s on GitHub Pages.

## Changes

### Workflow (`publish-documentation.yml`)
- **Guide snapshot**: copies `api-reference/guide/` into
`api-reference/{ver}/guide/` immediately after API metadata generation,
so each version folder contains a full snapshot of both guide and API
reference
- **DocFX version groups**: each group now registers two content entries
— API YAMLs (`*.yml`) and guide pages (`guide/*.{md,yml}`) — producing
`_docs/{ver}/` and `_docs/{ver}/guide/` in the build output
- **Global TOC**: `Guide` nav link now points to
`{latest}/guide/introduction.html` instead of the unversioned `guide/`
- **index.md injection**: a single step builds the released versions
table and substitutes both `{version}` and `{versions_section}`
placeholders before `docfx build` runs (no committed artefacts)

### `api-reference/api-reference.json`
- Removed `guide/*.{md,yml}` from the global content entry — guide pages
now exist only within versioned groups

### `api-reference/index.md`
- Replaced broken links with `{version}`-placeholder paths resolved at
build time
- Added a `{versions_section}` placeholder that the workflow expands
into a full released-versions table

### `docs-versioning/public/version-switcher.js`
- Fixed the fallback navigation branch to resolve the site root via the
`docfx:rel` meta tag and navigate to `/{ver}/PolylineAlgorithm.html`
instead of the bare `/{ver}/` folder
…#182)

Version switcher on the global index page produced broken URLs like
`.../index.html/1.0/PolylineAlgorithm.html`, and even when corrected
would land users on the raw API reference — a poor first-visit
experience. Introduction was also redundant as a separate guide entry.

## Changes

### `version-switcher.js`
- **URL fix**: `getSiteRoot()` treated an empty `docfx:rel` meta
attribute as a valid relative URL, causing `new URL('',
'.../index.html')` to resolve to the full page path including the
filename. Now falls back to `'./'` when the attribute is empty.
- **Better redirect from index**: Selecting a version on the global
index now navigates to `{version}/guide/getting-started.html` instead of
`{version}/PolylineAlgorithm.html`.

```js
// Before
return meta ? meta.getAttribute('content') : './';
// After — empty string is falsy, so we fall back to './'
return meta ? (meta.getAttribute('content') || './') : './';
```

### `api-reference/guide/toc.yml`
- Removed the **Introduction** entry; **Getting Started** is now the
first and default page in the versioned guide sidebar.

### `api-reference/index.md`
- Replaced the bare link list with a proper landing page: library
summary, key benefits, and a quick-start install snippet — content drawn
from `introduction.md`. The `{versions_section}` placeholder is
preserved for workflow injection.

### `publish-documentation.yml`
- Navbar `toc.yml` generation and the versions table both updated to
link to `getting-started.html` instead of the now-removed
`introduction.html`.
…#185)

## Summary

Adds `.github/workflows/backtrack.yml` — an automated workflow that
back-merges changes from higher branches into lower branches after a PR
is merged, with branch locking to prevent race conditions.

## Background

Currently the back-merges (e.g. `Merge branch 'preview/1.0' into
develop/1.0`) are done manually. Without any coordination, a developer
could push a commit to `develop/M.n` between the moment the workflow
reads the branch tip and when it pushes the merge — causing the push to
fail or producing an incorrect merge base.

## What the workflow does

**Trigger**: any PR that is _merged_ into `preview/**` or `release/**`

| Source (base_ref) | Backtrack cascade |
|---|---|
| `preview/M.n` | `preview/M.n → develop/M.n` |
| `release/M.n` | `release/M.n → preview/M.n → develop/M.n` |

**Race-condition protection**:
1. `develop/M.n` is **locked** (branch protection applied) before any
merge begins — blocking concurrent direct pushes from developers.
2. All pushes use `GH_ADMIN_TOKEN`, which bypasses `enforce_admins:
false` protection — so the workflow can push even to a locked branch.
3. `develop/M.n` is **unlocked** in an `always()` step keyed on
`steps.lock-develop.outcome != 'skipped'` — ensures cleanup even if a
merge fails.
4. `preview/M.n` is already permanently locked by `promote-branch.yml`
and does not need extra lock/unlock steps; the admin token bypasses it
for the release→preview merge.

## Impact on other workflows

- **`bump-version.yml`**: unaffected — it creates brand-new branches via
`workflow_dispatch` (no PR merge event) and pushes to branches that have
no protection yet.
- **`promote-branch.yml`**: unaffected — it handles forward promotion
and creates/locks branches on first creation.
- **`release.yml`**: unaffected — it handles building, publishing, and
creating support branches.
…ed (#187)

- [x] Understand the gap: base branch (`github.base_ref`) was not locked
during backtracking, allowing new PR merges into it concurrently
- [x] Lock base branch (`github.base_ref`) with `lock-branch: 'true'`
before the merge steps
- [x] Restore permanent protection on base branch after backtrack
(always, guarded by lock step outcome)
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
The release workflow's "Create GitHub Release" job was failing with
`unexpected EOF while looking for matching '"'` due to a quoting bug in
the composite action.

## Changes

- **Unmatched quote (root cause):** `notes-start-tag-argument` echo
placed the `${{ expr }}` *outside* the surrounding double-quotes. When
`notes-start-tag` is empty the expression expands to nothing, leaving a
bare `"` that bash can't match:
  ```bash
  # before — broken when expr is empty
  echo "notes-start-tag-argument="${{ ... }}"
  
  # after — expression inside the quotes
  echo "notes-start-tag-argument=${{ ... }}"
  ```

- **Wrong interpolation syntax in `notes-start-tag-argument` env:** Used
bash command-substitution syntax `$(inputs.notes-start-tag)` inside a GH
Actions expression — would have tried to shell-execute
`inputs.notes-start-tag` when the tag was non-empty. Replaced with
`format('--notes-start-tag {0}', inputs.notes-start-tag)`.

- **Wrong env reference in "Create git tag" step:** Referenced `${{
env.release-version }}` which is only scoped to the *next* step's `env:`
block, so it always resolved to empty. Changed to `${{
inputs.release-version }}`.
`gh pr create --fill` computes the PR body by running `git log
origin/<target>...HEAD`, but the shallow checkout (`fetch-depth: 1`)
only fetches the source branch. With `origin/<target>` absent from the
local repo, git fails with "ambiguous argument" and the job exits
non-zero.

## Changes

- **`.github/workflows/promote-branch.yml`** — add `git fetch origin ${{
env.target-branch }}` immediately before `gh pr create` in the "Create
PR" step, ensuring the remote tracking ref exists when `--fill` computes
the commit range.
`gh release create` requires the tag to exist on the remote — creating
it locally with `git tag` is not sufficient. The job was failing every
time with:

```
tag 1.0.69.11 exists locally but has not been pushed to petesramek/polyline-algorithm-csharp,
please push it before continuing or specify the `--target` flag to create a new tag
```

## Change

- **`.github/actions/github/create-release/action.yml`** — push the
annotated tag to `origin` immediately after creating it, before invoking
`gh release create`

```diff
     run: |
       git tag -a ${{ inputs.release-version }} -m "${{ inputs.release-version }}"
+      git push origin ${{ inputs.release-version }}
```
The `merge-to-main` job was failing because `GITHUB_TOKEN` lacked
`pull-requests: write`, causing `gh pr create` to be rejected with
`GraphQL: Resource not accessible by integration (createPullRequest)`.

## Change

- Added job-level `permissions` block to `merge-to-main` with
`pull-requests: write` and `contents: read`, scoped only to the job that
needs it rather than elevating the entire workflow.

```yaml
merge-to-main:
  ...
  permissions:
    pull-requests: write
    contents: read
```
Removed SIMD validation in favor of one pass loop.
Co-authored-by: Pete Sramek <2333452+petesramek@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Pete Sramek <2333452+petesramek@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants