diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 4dfbb71..aeb09fb 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -23,6 +23,16 @@ jobs: - uses: actions/checkout@v3 with: ref: ${{ github.event.release.tag_name }} + + - name: verify tag matches version + run: | + # run generateb binary --version + BINARY_REPORTED_VERSION=`cat Cargo.toml |grep ^version | head -n1 | cut -f 2 -d "\""` + echo "found version $BINARY_REPORTED_VERSION" + if [ "${{ github.event.release.tag_name }}" != "$BINARY_REPORTED_VERSION" ]; then + echo "Tag does not match version. Aborting" + exit 1 + fi - name: Compile and release uses: rust-build/rust-build.action@latest env: @@ -30,14 +40,6 @@ jobs: RUSTTARGET: ${{ matrix.target }} EXTRA_FILES: "README.md LICENSE" ARCHIVE_TYPES: "tar.gz" - - name: verify tag matches version - run: | - # run generateb binary --version - BINARY_REPORTED_VERSION=`./target/x86_64-unknown-linux-musl/release/anysnake2 --version` - if [ "Anysnake2 ${{ github.event.release.tag_name }}" != "$BINARY_REPORTED_VERSION" ]; then - echo "Tag does not match version. Aborting" - exit 1 - fi - name: tell release flake run: | curl \