tag-creation-success #9
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: Publish | |
on: | |
repository_dispatch: | |
types: [tag-creation-success] | |
jobs: | |
binary: | |
if: github.repository == 'jaywcjlove/sgo-rs' | |
name: Publish ${{ matrix.target }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-latest | |
- target: x86_64-unknown-linux-musl | |
os: ubuntu-latest | |
- target: i686-unknown-linux-musl | |
os: ubuntu-latest | |
- target: aarch64-unknown-linux-musl | |
os: ubuntu-latest | |
- target: arm-unknown-linux-musleabihf | |
os: ubuntu-latest | |
- target: x86_64-apple-darwin | |
os: macos-latest | |
- target: aarch64-apple-darwin | |
os: macos-latest | |
- target: x86_64-pc-windows-msvc | |
os: windows-latest | |
rustflags: -C target-feature=+crt-static | |
- target: i686-pc-windows-msvc | |
os: windows-latest | |
rustflags: -C target-feature=+crt-static | |
- target: aarch64-pc-windows-msvc | |
os: windows-latest | |
rustflags: -C target-feature=+crt-static | |
- target: x86_64-unknown-freebsd | |
os: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Build | |
run: cargo build --release | |
- name: Rename SGO | |
run: mv target/release/sgo target/release/sgo-${{ matrix.target }} | |
- name: Print Folder Tree | |
uses: jaywcjlove/github-action-folder-tree@main | |
with: | |
exclude: ".git|.github|.husky|src" | |
depth: 3 | |
- name: Read Version | |
run: | | |
echo "Commit message 1: ${{ github.event.client_payload.version }}" | |
- name: Upload sgo-${{ matrix.target }} | |
uses: jaywcjlove/github-action-upload-assets@main | |
continue-on-error: true | |
with: | |
tag: ${{ github.event.client_payload.version }} | |
asset-path: '["./target/release/sgo-*"]' |