-
Notifications
You must be signed in to change notification settings - Fork 26
48 lines (46 loc) · 1.71 KB
/
tag_version.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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: actions/setup-node@v4
with:
node-version: 20
- 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 Frontend Version
working-directory: ./packages/frontend
run: npx versionup --level ${{ github.event.inputs.releaseType }}
- name: Increment LTI Dashboard Version
working-directory: ./packages/lti-dashboard
run: npx versionup --level ${{ github.event.inputs.releaseType }}
- run: |
NEW_TAG=`node -p "require('./packages/frontend/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 v${{env.new_tag}} -m "Tagging the v${{env.new_tag}} ${{ github.event.inputs.releaseType }} release"
- name: Push Changes
run: git push --follow-tags
- uses: act10ns/slack@v2
if: failure()
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ILIOS_DEPLOYMENT_WEBHOOK_URL }}
with:
status: ${{ job.status }}
message: Version Tagging Failed {{ env.GITHUB_SERVER_URL }}/{{ env.GITHUB_REPOSITORY }}/actions/runs/{{ env.GITHUB_RUN_ID }}