Add Version Check to Release Actions
Some checks failed
Run Tests on Code / run-tests (push) Successful in 0s
Build and Release Binary File / run-tests (push) Failing after 2s
Build and Release Binary File / upload-release (push) Has been cancelled
Build and Release Binary File / build (push) Has been cancelled

This commit is contained in:
Neshura 2023-12-18 07:51:22 +00:00
parent f0c96012ce
commit 1885b481c9

View file

@ -10,9 +10,22 @@ jobs:
run-tests: run-tests:
runs-on: docker runs-on: docker
steps: steps:
-
name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3
- -
name: Placeholder name: Placeholder
run: echo Placeholder Job run: echo Placeholder Job
-
name: Check if Version in Cargo.toml matches Tag
run: |
VERSION=$(cat Cargo.toml | grep -E "(^|\|)version =" | cut -f2- -d= | tr -d \" | tr -d " ")
if test $VERSION != "${{ github.ref_name }}"; then
echo "Expected Version is: '${{ github.ref_name }}' actual Version is: '$VERSION'";
exit 1
else
echo "Version is: '$VERSION'";
fi
build: build:
needs: test needs: test