Skip to content

Tag Version

Tag Version #94

Workflow file for this run

name: Tag Version
on:
schedule:
- cron: '41 11 * * 6' # weekly, on Saturday morning (UTC)
workflow_dispatch:
jobs:
has_changes:
runs-on: ubuntu-latest
name: Check For Changes
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v4
- name: print latest_commit
run: echo ${{ github.sha }}
- id: should_run
if: ${{ github.event_name == 'schedule' }}
name: check that there have been commits since the last tag
run: test -z $(git rev-list $(git describe --tags --abbrev=0)..${{ github.sha }}) && echo "::set-output name=should_run::no"
tag:
needs: has_changes
runs-on: ubuntu-latest
if: ${{ needs.has_changes.outputs.should_run != 'no' }}
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.ZORGBORT_TOKEN }}
- name: Setup Git
run: |
git config --global user.name "Zorgbort"
git config --global user.email "[email protected]"
- name: Increment Version
run: npm version major
- name: Push Changes
run: git push --follow-tags