Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,15 @@ jobs:
tag="v$version"
echo "is_prerelease=false" >> $GITHUB_OUTPUT
else
tag="v$version-rc.${{ github.run_number }}"
git fetch --tags --force
existing_rc_tags=$(git tag -l "v$version-rc.*")
if [ -z "$existing_rc_tags" ]; then
next_rc=1
else
max_rc=$(echo "$existing_rc_tags" | sed -E 's/.*-rc\.([0-9]+)$/\1/' | sort -n | tail -1)
next_rc=$((max_rc + 1))
fi
tag="v$version-rc.$next_rc"
echo "is_prerelease=true" >> $GITHUB_OUTPUT
fi
echo "tag=$tag" >> $GITHUB_OUTPUT
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ node scripts/bump-version.js [major|minor|patch]

### Release types

| Branch | Tag | Type |
| --------- | ------------------------ | --------------------------------- |
| `main` | `v1.0.0` | Full release (marked as `latest`) |
| `staging` | `v1.0.0-rc.<run_number>` | Release candidate (prerelease) |
| Branch | Tag | Type |
| --------- | --------------- | --------------------------------- |
| `main` | `v1.0.0` | Full release (marked as `latest`) |
| `staging` | `v1.0.0-rc.<n>` | Release candidate (prerelease) |

### Artifacts

Expand Down