mirror of
https://github.com/encounter/decomp-toolkit.git
synced 2025-06-07 15:13:38 +00:00
Check if git tag matches Cargo version when releasing (#44)
* Check if git tag matches Cargo version when releasing * Specify `bash` explicitly
This commit is contained in:
parent
a41745fb97
commit
a2cae4f82a
13
.github/workflows/build.yml
vendored
13
.github/workflows/build.yml
vendored
@ -119,6 +119,19 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
- name: Check git tag against Cargo version
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -eou
|
||||||
|
version=$(grep '^version' Cargo.toml | awk -F' = ' '{print $2}' | tr -d '"')
|
||||||
|
version="v$version"
|
||||||
|
tag='${{github.ref}}'
|
||||||
|
tag="${tag#refs/tags/}"
|
||||||
|
if [ "$tag" != "$version" ]; then
|
||||||
|
echo "::error::Git tag doesn't match the Cargo version! ($tag != $version)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
if: matrix.packages != ''
|
if: matrix.packages != ''
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user