-
Notifications
You must be signed in to change notification settings - Fork 18
feat(release): automate OSS release pipeline with just release #757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
bfe1b38
feat(release): automate OSS release pipeline with just release
wpfleger96 9adf86a
fix: resolve Semgrep shell injection findings and correct RELEASING.md
wpfleger96 2bc7d38
fix: move remaining step output interpolations to env blocks in relea…
wpfleger96 a7469ef
fix: address crossfire code review findings
wpfleger96 b02e415
docs: add RELEASING.md to AGENTS.md See Also and fix Buildkite URL
wpfleger96 5e48618
docs(agents): add sprout ecosystem overview to AGENTS.md
wpfleger96 05aff01
fix: make auto-tag step idempotent for retry safety
wpfleger96 104171d
Merge branch 'main' into wpfleger/release-automation
wpfleger96 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| name: Auto-tag on Release PR Merge | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
| branches: [main] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| actions: write | ||
|
|
||
| jobs: | ||
| auto-tag: | ||
| if: > | ||
| github.event.pull_request.merged == true && | ||
| startsWith(github.event.pull_request.head.ref, 'version-bump/') | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| with: | ||
| ref: ${{ github.event.pull_request.merge_commit_sha }} | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Extract version from branch name | ||
| env: | ||
| BRANCH: ${{ github.event.pull_request.head.ref }} | ||
| run: | | ||
| VERSION="${BRANCH#version-bump/}" | ||
| if ! echo "$VERSION" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?$'; then | ||
| echo "::error::Invalid version in branch name: '$VERSION'" | ||
| exit 1 | ||
| fi | ||
| echo "version=$VERSION" >> "$GITHUB_ENV" | ||
| echo "Tagging v${VERSION}" | ||
|
|
||
| - name: Create and push tag | ||
| env: | ||
| VERSION: ${{ env.version }} | ||
| run: | | ||
| EXISTING_SHA="$(git ls-remote --tags origin "refs/tags/v$VERSION" | awk '{print $1}')" | ||
| if [ -n "$EXISTING_SHA" ]; then | ||
| if [ "$EXISTING_SHA" = "$GITHUB_SHA" ]; then | ||
| echo "Tag v$VERSION already exists at $GITHUB_SHA — skipping tag creation" | ||
| exit 0 | ||
| else | ||
| echo "::error::Tag v$VERSION already exists at $EXISTING_SHA (expected $GITHUB_SHA)" | ||
| exit 1 | ||
| fi | ||
| fi | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git config user.name "github-actions[bot]" | ||
| git tag "v$VERSION" | ||
| git push origin "v$VERSION" | ||
|
|
||
| - name: Trigger release build | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| VERSION: ${{ env.version }} | ||
| run: | | ||
| gh workflow run release.yml \ | ||
| -f version="$VERSION" \ | ||
| -f ref="v$VERSION" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.