diff --git a/.github/workflows/tagged-release.yml b/.github/workflows/tagged-release.yml new file mode 100644 index 0000000..ac258f3 --- /dev/null +++ b/.github/workflows/tagged-release.yml @@ -0,0 +1,45 @@ +name: tagged-release + +on: + push: + tags: + - 'v*' + +jobs: + publish: + name: Publish for ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + name: [linux, windows, macos] + + include: + - name: linux + os: ubuntu-latest + artifact_name: target/release/ + asset_name: -linux + - name: windows + os: windows-latest + artifact_name: target/release/.exe + asset_name: -windows + - name: macos + os: macos-latest + artifact_name: target/release/ + asset_name: -macos + + steps: + - uses: actions/checkout@v3 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + + - name: Build + run: cargo build --release --locked + + - name: Upload binaries to release + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.asset_name }} + path: ${{ matrix.artifact_name }}