Skip to content

tag-creation-success #16

tag-creation-success

tag-creation-success #16

Workflow file for this run

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
timeout-minutes: 10
with:
toolchain: stable
- name: Build
run: cargo build --release
- name: Print Folder Tree
uses: jaywcjlove/github-action-folder-tree@main
with:
exclude: ".git|.github|.husky|src"
depth: 3
- name: Set up zip tool on Windows
if: runner.os == 'Windows'
run: choco install zip
shell: pwsh
- name: Create zip file on Windows
if: runner.os == 'Windows'
run: powershell -command "Compress-Archive -Path 'target/release/sgo.exe' -DestinationPath 'sgo-${{ matrix.target }}.zip'"
- name: Create zip file on Unix
if: runner.os != 'Windows'
run: zip -j sgo-${{ matrix.target }}.zip target/release/sgo
- name: Read Version
run: |
echo "Commit message 1: ${{ github.event.client_payload.version }}"
- name: Print Folder Tree
uses: jaywcjlove/github-action-folder-tree@main
with:
exclude: ".git|.github|.husky|src"
depth: 3
- 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: '["./sgo-*"]'