Update release.yml

This commit is contained in:
House of Vanity
2023-06-20 00:25:43 +03:00
committed by GitHub
parent 72c12d5bb6
commit d419f5a800

View File

@ -1,28 +1,53 @@
# on:
# release:
# types: [created]
# jobs:
# release:
# name: release ${{ matrix.target }}
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# include:
# - target: x86_64-pc-windows-gnu
# archive: zip
# - target: x86_64-unknown-linux-musl
# archive: tar.gz tar.xz tar.zst
# - target: x86_64-apple-darwin
# archive: zip
# steps:
# - uses: actions/checkout@master
# - name: Compile and release
# uses: rust-build/rust-build.action@v1.4.3
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# RUSTTARGET: ${{ matrix.target }}
# ARCHIVE_TYPES: ${{ matrix.archive }}
name: Rust-static-build
on: on:
release: push:
types: [created] branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
BUILD_TARGET: x86_64-unknown-linux-musl
BINARY_NAME: rexec
jobs: jobs:
release: build:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz tar.xz tar.zst
- target: x86_64-apple-darwin
archive: zip
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v2
- name: Compile and release - name: Build-musl
uses: rust-build/rust-build.action@v1.4.3 uses: gmiam/rust-musl-action@master
env: with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} args: cargo build --target $BUILD_TARGET --release
with: - uses: actions/upload-artifact@v2
RUSTTARGET: ${{ matrix.target }} with:
ARCHIVE_TYPES: ${{ matrix.archive }} name: ${{ env.BINARY_NAME }}
path: target/x86_64-unknown-linux-musl/release/${{ env.BINARY_NAME }}*