Skip to content
This repository has been archived by the owner on Feb 3, 2024. It is now read-only.

Tag Version

Tag Version #83

Workflow file for this run

name: Tag Version
on:
workflow_dispatch:
inputs:
releaseType:
description: 'Semver Release Type (major,minor,patch)'
required: true
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.ZORGBORT_TOKEN }}
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
- name: Validate releaseType
run: npx in-string-list ${{ github.event.inputs.releaseType }} major,minor,patch
- name: Setup Git
run: |
git config user.name Zorgbort
git config user.email [email protected]
- name: Increment Version
working-directory: ./packages/ilios-common
run: npx versionup --level ${{ github.event.inputs.releaseType }}
- run: |
NEW_TAG=`node -p "require('./packages/ilios-common/package.json').version"`
echo ${NEW_TAG}
echo "new_tag=${NEW_TAG}" >> $GITHUB_ENV
- name: Tag Version
run: |
git commit -a -m "${{env.new_tag}}"
git tag ${{env.new_tag}} -m "Tagging the ${{env.new_tag}} ${{ github.event.inputs.releaseType }} release"
- name: Push Changes
run: git push --follow-tags