Add Version Checking to Actions file

This commit is contained in:
Neshura 2023-12-13 19:05:58 +01:00
parent 8373b278cc
commit c8ed40c3cc
Signed by: Neshura
GPG key ID: B6983AAA6B9A7A6C

View file

@ -10,9 +10,22 @@ jobs:
run-tests:
runs-on: docker
steps:
-
name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3
-
name: Placeholder
run: echo Placeholder Job
-
name: Check if Version in Cargo.toml matches Tag
run: |
VERSION=$(cat src-tauri/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:
needs: test