Skip to content

Automate branch-based alpha publishing in graphitation-release pipeline#640

Draft
Copilot wants to merge 14 commits intomainfrom
copilot/update-alpha-release-strategy
Draft

Automate branch-based alpha publishing in graphitation-release pipeline#640
Copilot wants to merge 14 commits intomainfrom
copilot/update-alpha-release-strategy

Conversation

Copy link
Contributor

Copilot AI commented Mar 12, 2026

This updates the Azure DevOps release flow to publish based on the branch the pipeline runs from, without any manual prerelease toggle.

  • Automatic branch-based release behavior

    • Removed the runtime prerelease boolean parameter from .azure-devops/graphitation-release.yml.
    • Release mode is now inferred automatically from the source branch.
  • Branch-aware publish targeting

    • Release commands now always target the branch that triggered the pipeline via:
      • -b origin/${BUILD_SOURCEBRANCH#refs/heads/}
    • Applied consistently to both npmjs publish and Azure Artifacts publish steps.
  • Automatic npm tag selection

    • On main, publish uses the default npm dist-tag behavior (latest).
    • On non-main branches, publish uses -t alpha automatically.
  • Beachball script alignment

    • Updated root package.json scripts so origin/main is pinned only for:
      • yarn change
      • yarn checkchange
    • yarn beachball remains unpinned for general usage.
  • Release docs simplification

    • Rewrote CONTRIBUTING.md release instructions to the new operational model:
      • run pipeline from target branch
      • no manual prerelease toggle
      • pipeline automatically selects latest for main and alpha for non-main, while targeting the run branch

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@pavelglac
Copy link
Contributor

@copilot what is the default behavior of beachball for pushing changes? I am thinking if only yarn change and yarn checkchange needs to know what is the main branch. With that we could just change these two and rest would be safe that changelogs would be pushed to source branch (so you would avoid unexpected commits in main).

Copy link
Contributor Author

Copilot AI commented Mar 12, 2026

@copilot what is the default behavior of beachball for pushing changes? I am thinking if only yarn change and yarn checkchange needs to know what is the main branch. With that we could just change...

Good call — I updated this in commit a50e246. beachball publish pushes by default (unless --no-push is set), and -b is for the compare target branch. I changed scripts so only change/checkchange pin origin/main, while publish uses defaults, which keeps changelog/version commits on the source branch.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • microsoft.github.io
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@pavelglac
Copy link
Contributor

@copilot so what will happen if I call yarn beachball publish without branch? Please find answer in beachball repository.

Copy link
Contributor Author

Copilot AI commented Mar 12, 2026

@copilot so what will happen if I call yarn beachball publish without branch? Please find answer in beachball repository.

From microsoft/beachball docs/help: publish defaults to --push (so it commits + pushes), and if -b/--branch is omitted it targets git config init.defaultBranch (typically main), not necessarily the current checked-out branch. I updated the pipeline in b478904 to pass publish -b "$releaseBranch" explicitly for prerelease runs.

@pavelglac
Copy link
Contributor

@copilot I want to have different logic.

  1. When branch is different than main add tag alpha
  2. Always target the branch from which the release pipeline is running.

I want you to only change the pipeline and document. Now you do not need to specify that you want to prerelease. It will be automatically if it will not be from the main branch.

Copy link
Contributor Author

Copilot AI commented Mar 12, 2026

@copilot I want to have different logic.

  1. When branch is different than main add tag alpha
  2. Always target the branch from which the release pipeline is running.
    ...

Implemented in eee022d.

  • Removed the manual prerelease pipeline parameter.
  • Pipeline now always targets the running branch (-b origin/${BUILD_SOURCEBRANCH#refs/heads/}).
  • Non-main branches publish with -t alpha automatically.
  • main publishes with default tag behavior.
  • Updated CONTRIBUTING.md to match this flow.

Screenshot: N/A (no UI changes; pipeline + docs only).

Copilot AI changed the title Add one-click prerelease mode to graphitation-release pipeline Automate branch-based alpha publishing in graphitation-release pipeline Mar 12, 2026
Copilot AI and others added 10 commits March 13, 2026 09:59
Co-authored-by: pavelglac <42679661+pavelglac@users.noreply.github.com>
Co-authored-by: pavelglac <42679661+pavelglac@users.noreply.github.com>
Co-authored-by: pavelglac <42679661+pavelglac@users.noreply.github.com>
Co-authored-by: pavelglac <42679661+pavelglac@users.noreply.github.com>
Co-authored-by: pavelglac <42679661+pavelglac@users.noreply.github.com>
Co-authored-by: pavelglac <42679661+pavelglac@users.noreply.github.com>
Co-authored-by: pavelglac <42679661+pavelglac@users.noreply.github.com>
Co-authored-by: pavelglac <42679661+pavelglac@users.noreply.github.com>
@pavelglac pavelglac force-pushed the copilot/update-alpha-release-strategy branch from eee022d to b2b8dba Compare March 13, 2026 10:01
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.

3 participants