Skip to content

Commit

Permalink
use tomlq for now to fix version check job ci release flow
Browse files Browse the repository at this point in the history
  • Loading branch information
TanklesXL committed May 16, 2024
1 parent bb20bbe commit b8fb91d
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- run: cargo install tomlq
- run: |
# this first one requires the tag to not be prefixed with a v
# version="v$(cat gleam.toml | grep -m 1 "version" | sed -r "s/version *= *\"([[:digit:].]+)\"/\1/")"
version="$(cat gleam.toml | grep -m 1 "version" | sed -r "s/version *= *\"([[:digit:].]+)\"/\1/")"
if [ "$version" != "${{ github.ref_name }}" ]; then
echo "tag '${{ github.ref_name }}' does not match the version in gleam.toml"
echo "expected a tag name 'v$version'"
exit 1
if [ "v$(tomlq version -f gleam.toml)" == "${{ github.ref_name }}" ]; then
exit 0
fi
echo "tag does not match version in gleam.toml, refusing to publish"
exit 1
release-gh:
runs-on: ubuntu-latest
Expand Down

0 comments on commit b8fb91d

Please sign in to comment.