-
Notifications
You must be signed in to change notification settings - Fork 9
Implement beta publishing on development branch #85
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
Changes from all commits
9ab712d
3ca4e3c
7343821
734eb9d
ca1026d
53fc315
01c9519
e75ec6f
f5d8dcc
b5ae1bc
2fc8a46
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Bump beta version tag | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
|
Comment on lines
+3
to
+5
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| tag: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| concurrency: | ||
| group: tag-development | ||
| cancel-in-progress: false | ||
|
|
||
| env: | ||
| PAT: ${{ secrets.ORG_PAT }} | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Compute next beta tag | ||
| id: version | ||
| run: | | ||
| git fetch --tags | ||
| STABLE=$(git tag --list "v*" \ | ||
| | grep -Ev -- '-beta' \ | ||
| | sort -V \ | ||
| | tail -n 1) | ||
| STABLE=${STABLE:-v0.0.0} | ||
| BASE=${STABLE#v} | ||
| EXISTING=$(git tag -l "v$BASE-beta*" | sort -V | tail -n 1) | ||
| if [[ -z "$EXISTING" ]]; then | ||
| NEXT="v$BASE-beta.1" | ||
| else | ||
| NUM=$(echo "$EXISTING" | sed -E 's/.*beta\.?([0-9]*)/\1/') | ||
| NEXT="v$BASE-beta.$((NUM+1))" | ||
| fi | ||
| echo "next=$NEXT" >> $GITHUB_OUTPUT | ||
| - name: Create and push tag | ||
| run: | | ||
| git config --global user.name "GitHub Actions" | ||
| git config --global user.email "actions@github.com" | ||
|
|
||
| TAG=${{ steps.version.outputs.next }} | ||
|
|
||
| git tag "$TAG" | ||
|
|
||
| git push https://x-access-token:${PAT}@github.com/${{ github.repository }}.git refs/tags/$TAG | ||
Uh oh!
There was an error while loading. Please reload this page.