@@ -9,7 +9,24 @@ on:
99 types: [prereleased]
1010
1111jobs:
12+ check_versions:
13+ if: github.event_name == 'release'
14+ runs-on: ubuntu-latest
15+ steps:
16+ - name: Check library version
17+ run: |
18+ if [ "$(awk -F ':' '/^version/ {gsub(/ /, "", $2); print $2}' compaREST.cabal)" != "0.0.0.1" ]; then
19+ echo "::error file=compaREST.cabal::Library version does not match release version."
20+ fi
21+
22+ - name: Check docker tag
23+ run: |
24+ if [ "$(yq eval '.runs.image' action.yaml | awk -F ':' '{print $NF}')" != "latet" ]; then
25+ echo "::error file=action.yaml::Action docker tag does not match release tag."
26+ fi
27+
1228 Linux:
29+ needs: check_versions
1330 runs-on: ubuntu-latest
1431 steps:
1532 - uses: actions/checkout@v2
@@ -113,6 +130,7 @@ jobs:
113130 tag: ${{ github.ref }}
114131
115132 macOS:
133+ needs: check_versions
116134 runs-on: macos-latest
117135 steps:
118136 - uses: actions/checkout@v2
@@ -149,6 +167,7 @@ jobs:
149167 tag: ${{ github.ref }}
150168
151169 Linux-Windows:
170+ needs: check_versions
152171 runs-on: ubuntu-latest
153172 steps:
154173 - uses: actions/checkout@v2