mirror of
https://github.com/bartvdbraak/keyweave.git
synced 2025-05-03 01:21:21 +00:00
feat: pre-check for git tag and project version
This commit is contained in:
parent
8b033eea08
commit
609e4fe6da
1 changed files with 14 additions and 1 deletions
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
|
@ -5,9 +5,22 @@ on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v[0-9]+.[0-9]+.[0-9]+'
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
pre-check:
|
||||||
|
name: Pre-check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- run: |
|
||||||
|
if [[ "$(git describe --tags --abbrev=0)" != "v$(grep -m1 -F 'version =' Cargo.toml | cut -d\" -f2)" ]]; then
|
||||||
|
echo "Error: The git tag does not match the Cargo.toml version."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Success: The git tag matches the Cargo.toml version."
|
||||||
|
|
||||||
build:
|
build:
|
||||||
|
needs: pre-check
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
name:
|
name:
|
||||||
|
|
Loading…
Reference in a new issue