Merge pull request #264 from kohbis/revert-262-revert-260-release-ple… #1
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
--- | ||
name: GitHub release binary | ||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
- 'v[0-9]+.[0-9]+.[0-9]+-*' | ||
jobs: | ||
github-release: | ||
Check failure on line 11 in .github/workflows/github-release-binary.yaml GitHub Actions / GitHub release binaryInvalid workflow file
|
||
name: GitHub release (${{ matrix.os }}) | ||
runs-on: ${{ matrix.os }} | ||
needs: release-please | ||
if: needs.release-please.outputs.created | ||
strategy: | ||
matrix: | ||
os: [macos-latest, ubuntu-latest] | ||
rust: [stable] | ||
include: | ||
- os: macos-latest | ||
artifact_prefix: macos | ||
target: x86_64-apple-darwin | ||
- os: ubuntu-latest | ||
artifact_prefix: linux | ||
target: x86_64-unknown-linux-gnu | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
target: ${{ matrix.target }} | ||
- uses: Swatinem/rust-cache@v2 | ||
- name: Cargo build | ||
run: > | ||
cargo build | ||
--release | ||
--target ${{ matrix.target }} | ||
- name: Packaging final binary | ||
shell: bash | ||
run: | | ||
cd target/${{ matrix.target }}/release | ||
strip rslack | ||
tar czvf rslack-${{ matrix.artifact_prefix }}.tar.gz rslack | ||
shasum -a 256 rslack-${{ matrix.artifact_prefix }}.tar.gz > rslack-${{ matrix.artifact_prefix }}.sha256 | ||
- name: Releasing assets | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
target/${{ matrix.target }}/release/rslack-${{ matrix.artifact_prefix }}.tar.gz | ||
target/${{ matrix.target }}/release/rslack-${{ matrix.artifact_prefix }}.sha256 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||