Repository navigation
feat: add release workflow for version tag sync #25
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 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
10d6edb
feat: add release workflow for version tag sync
ggallen f08f6a9
fix(release): address review findings
ggallen 3e5f2a0
fix(release): keep release.yml extension to match fullsend
ggallen bec2e76
docs: add README
ggallen 24eef7e
fix(docs): correct workflow filename in AGENTS.md
ggallen 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
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,58 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - "v[0-9]+.[0-9]+.[0-9]+*" | ||
|
ggallen marked this conversation as resolved.
Resolved
|
||
|
|
||
| permissions: | ||
| contents: write | ||
|
ggallen marked this conversation as resolved.
Resolved
|
||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Create GitHub Release | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| set -euo pipefail | ||
| TAG="${GITHUB_REF_NAME}" | ||
|
|
||
| if gh release view "${TAG}" >/dev/null 2>&1; then | ||
| echo "Release ${TAG} already exists, skipping" | ||
| exit 0 | ||
| fi | ||
|
|
||
| PRERELEASE="" | ||
| if [[ "${TAG}" == *-* ]]; then | ||
| PRERELEASE="--prerelease" | ||
| fi | ||
|
|
||
| gh release create "${TAG}" \ | ||
| --title "${TAG}" \ | ||
|
ggallen marked this conversation as resolved.
Resolved
|
||
| --notes "Synced with [fullsend ${TAG}](https://github.com/fullsend-ai/fullsend/releases/tag/${TAG})" \ | ||
| ${PRERELEASE} | ||
|
|
||
| - name: Move v0 floating tag | ||
|
ggallen marked this conversation as resolved.
Resolved
|
||
| if: "!contains(github.ref_name, '-')" | ||
| run: | | ||
| set -euo pipefail | ||
| CURRENT="" | ||
| if git rev-parse v0 >/dev/null 2>&1; then | ||
| CURRENT=$(git rev-parse v0) | ||
|
ggallen marked this conversation as resolved.
Resolved
|
||
| if ! git merge-base --is-ancestor "${CURRENT}" "${GITHUB_SHA}"; then | ||
| echo "::warning::v0 already points at a newer commit, skipping" | ||
| exit 0 | ||
| fi | ||
| fi | ||
| git tag -f v0 "${GITHUB_SHA}" | ||
| if [[ -n "${CURRENT}" ]]; then | ||
| git push --force-with-lease="v0:${CURRENT}" origin v0 | ||
| else | ||
| git push origin v0 | ||
| fi | ||
|
ggallen marked this conversation as resolved.
Resolved
ggallen marked this conversation as resolved.
Resolved
|
||
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.