Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/release.yml | |
on: | |
release: | |
types: [created, edited] | |
jobs: | |
release: | |
name: release ${{ matrix.target }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: [x86_64-unknown-linux-musl] | |
steps: | |
- name: what is in the box | |
run: | | |
echo "payload" ${{ github.event}} | |
- name: what is in the box part 2 | |
run: | | |
echo "payload" ${{ github.event.release}} | |
- 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: tell release flake | |
run: | | |
curl \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.ANYSNAKE2_RELASE_FLAKE_SECRET }}" \ | |
https://api.github.com/repos/TyberiusPrime/anysnake2_release_flakes/dispatches \ | |
-d '{"event_type":"on-demand-test","client_payload":{"release_version":"${{ github.event.release.tag_name }}"}}' | |