Skip to content

Merge pull request #75 from TheWorldAvatar/Ushcode/61/Tag-commits-wit… #1

Merge pull request #75 from TheWorldAvatar/Ushcode/61/Tag-commits-wit…

Merge pull request #75 from TheWorldAvatar/Ushcode/61/Tag-commits-wit… #1

Workflow file for this run

name: Tag Version
permissions:
contents: write
env: VERSION

Check failure on line 6 in .github/workflows/tag-version.yml

View workflow run for this annotation

GitHub Actions / Tag Version

Invalid workflow file

The workflow is not valid. .github/workflows/tag-version.yml (Line: 6, Col: 6): Unexpected value 'VERSION'

Check failure on line 6 in .github/workflows/tag-version.yml

View workflow run for this annotation

GitHub Actions / Tag Version

Invalid workflow file

The workflow is not valid. .github/workflows/tag-version.yml (Line: 6, Col: 6): Unexpected value 'VERSION'
on:
push:
branches:
- main
workflow_dispatch:
jobs:
tag-version:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Git
run: |
git config --global user.email "viz-bot@noreply.theworldavatar.io"
git config --global user.name "twa-viz-bot"
- name: Save version to environment
run: |
if [ -f VERSION ]; then
echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
else
echo "VERSION file not found" && exit 1
fi
- name: Create tag
run: |
git tag -a "v${{ env.VERSION }}" -m "Version ${{ env.VERSION }}"
git push origin "v${{ env.VERSION }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}