Skip to content

Commit

Permalink
compability with pre 2.0 versions (auto-version-switch)
Browse files Browse the repository at this point in the history
  • Loading branch information
TyberiusPrime committed Sep 16, 2024
1 parent 27994a8 commit 88609c1
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,23 @@ 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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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 \
Expand Down

0 comments on commit 88609c1

Please sign in to comment.