Skip to content

Commit

Permalink
try adding release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ntBre committed Jul 20, 2024
1 parent 280507c commit c326f63
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# adapted from
# https://github.com/softprops/rust-bin-test/blob/master/.github/workflows/main.yml
name: release

on:
push:
tags:
- "v*.*.*"

jobs:
release:
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
toolchain: [nightly]
include:
- os: ubuntu-latest
rust: nightly
target: x86_64-unknown-linux-gnu
bin: pbqff
name: pbqff-linux-x86_64.tar.gz
- os: macOS-latest
rust: nightly
target: x86_64-apple-darwin
bin: pbqff
name: pbqff-darwin-x86_64.tar.gz
runs-on: ${{ matrix.os }}
steps:
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
- name: Configure Rustup
run: rustup target add ${{ matrix.target }}
- name: Checkout
uses: actions/checkout@v1
- name: Build
run: cargo build --release --features vers --target ${{ matrix.target }}
- name: Package
shell: bash
run: |
strip target/${{ matrix.target }}/release/${{ matrix.bin }}
cd target/${{ matrix.target }}/release
tar czvf ../../../${{ matrix.name }} ${{ matrix.bin }}
cd -
- name: Publish
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: 'pbqff*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c326f63

Please sign in to comment.