Skip to content

Commit

Permalink
Add GitHub Action to auto-tag releases on merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jfdoming committed Feb 22, 2025
1 parent 1511587 commit 2f7a961
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/auto-tag-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Tag releases on merge
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# need to explore tags
fetch-depth: 0
filter: tree:0
- name: Push released tag
shell: bash
run: |
current_version="$(jq -r .version packages/desktop-client/package.json)"
last_tagged_version="$(git describe --tags $(git rev-list --tags --max-count=1))"
if [ -n "$current_version" ] && [ "$current_version" -eq "$last_tagged_version" ]; then
git tag "$current_version"
git push "$current_version"
fi

0 comments on commit 2f7a961

Please sign in to comment.