diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2f578d5..10f7ec4 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,10 +1,8 @@ name: Rust on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] + release: + types: [ "created" ] env: CARGO_TERM_COLOR: always @@ -18,6 +16,12 @@ jobs: - uses: actions/checkout@v3 - name: Build run: cargo build --verbose --release + - name: Publish + uses: skx/github-actions-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: 'target/release/qft' build-mac: runs-on: macos-11 @@ -26,6 +30,14 @@ jobs: - uses: actions/checkout@v3 - name: Build run: cargo build --verbose --release + - name: Build + run: mv target/release/qft target/release/qft-mac + - name: Publish + uses: skx/github-actions-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: 'target/release/qft-mac' build-win: runs-on: windows-latest @@ -34,3 +46,9 @@ jobs: - uses: actions/checkout@v3 - name: Build run: cargo build --verbose --release + - name: Publish + uses: skx/github-actions-publish-binaries@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + args: 'target/release/qft.exe'