chore(ci): tag deployment versions

This commit is contained in:
rektdeckard 2025-09-02 16:19:49 -06:00
parent 6fdf7f0b9a
commit 733c1e044b

View File

@ -1,9 +1,7 @@
name: Sync main to sandbox-production
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
@ -31,3 +29,13 @@ jobs:
git checkout sandbox-production || git checkout -b sandbox-production
git merge --strategy-option theirs main
git push origin sandbox-production
- name: Tag the deployment
if: github.ref == 'refs/heads/main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Increment version from previous tag of format vX
VERSION=$(git describe --tags --abbrev=0 | sed 's/^v//' | awk -F. -v OFS=. '{$NF++;print}')
git tag -a "v$VERSION" -m "Deploy v$VERSION to production"
git push origin "v$VERSION"