-
Notifications
You must be signed in to change notification settings - Fork 472
33 lines (28 loc) · 1.02 KB
/
validate-tag.yml
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
name: ⚙️ Validate release tag
on:
push:
branches: [main, 'release/*']
jobs:
validate-tag:
name: Validate tag
runs-on: ubuntu-latest
steps:
- uses: taiga-family/ci/actions/setup/[email protected]
with:
fetch-depth: 0
- uses: taiga-family/ci/actions/setup/[email protected]
id: nodejs-workspace
- name: Get last tag
id: info
run: echo "tag=$(git tag --list --sort=-authordate --merged | head -n1)" >> $GITHUB_OUTPUT
- name: Show an error if the tag does not match
if:
${{ steps.nodejs-workspace.outputs.root-package-version != steps.info.outputs.tag &&
!contains(steps.nodejs-workspace.outputs.root-package-version, '-rc') }}
run: |
echo "Version from package.json: ${{ steps.nodejs-workspace.outputs.root-package-version }}"
echo "Last git tag: ${{ steps.info.outputs.tag }}"
exit 1
concurrency:
group: validate-tag-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true