Skip to content

Commit

Permalink
Create major-version-updater.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zkoppert committed Oct 4, 2023
1 parent 52294af commit 9ba3199
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/major-version-updater.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Major Version Updater
# Whenever a new release is made, push a major version tag
on:
release:
types: [ published ]

jobs:
update-major-version-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4

- name: version
id: version
run: |
tag=${GITHUB_REF/refs\/tags\//}
version=${tag#v}
major=${version%%.*}
echo "tag=${tag}" >> "$GITHUB_OUTPUT"
echo "version=${version}" >> "$GITHUB_OUTPUT"
echo "major=${major}" >> "$GITHUB_OUTPUT"
- name: force update major tag
run: |
git tag v${{ steps.version.outputs.major }}
git push origin refs/tags/v${{ steps.version.outputs.major }} -f

0 comments on commit 9ba3199

Please sign in to comment.