mirror of
https://github.com/house-of-vanity/rexec.git
synced 2025-07-07 08:54:06 +00:00
67 lines
1.8 KiB
YAML
67 lines
1.8 KiB
YAML
name: Rust static build and publish
|
|
on: ["push"]
|
|
# push:
|
|
# tags:
|
|
# - '*'
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
BUILD_TARGET: x86_64-unknown-linux-musl
|
|
BINARY_NAME: rexec
|
|
jobs:
|
|
build:
|
|
name: Build static binary
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: mbrobbel/rustfmt-check@master
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Build-musl
|
|
uses: gmiam/rust-musl-action@master
|
|
with:
|
|
args: cargo build --target $BUILD_TARGET --release
|
|
- uses: actions/upload-artifact@v2
|
|
name: Upload artifact
|
|
with:
|
|
name: ${{ env.BINARY_NAME }}_x86_64-linux-musl
|
|
path: target/x86_64-unknown-linux-musl/release/${{ env.BINARY_NAME }}
|
|
|
|
build_arch:
|
|
name: Arch Linux package
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: archlinux
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/download-artifact@master
|
|
name: Download built binary
|
|
id: download_binary
|
|
with:
|
|
name: ${{ env.BINARY_NAME }}_x86_64-linux-musl
|
|
path: ${{ env.BINARY_NAME }}_x86_64-linux-musl
|
|
- name: List
|
|
run: ls -lah
|
|
|
|
# release:
|
|
# name: Release binary
|
|
# needs: ["build", "build_arch"]
|
|
# runs-on: ubuntu-latest
|
|
# permissions:
|
|
# contents: write
|
|
# steps:
|
|
# - uses: actions/download-artifact@master
|
|
# id: download_binary
|
|
# with:
|
|
# name: ${{ env.BINARY_NAME }}_x86_64-linux-musl
|
|
# path: ${{ env.BINARY_NAME }}_x86_64-linux-musl
|
|
# - uses: ncipollo/release-action@v1
|
|
# name: Update release page
|
|
# with:
|
|
# artifacts: "${{ steps.download_binary.outputs.download-path }}/*"
|
|
# allowUpdates: true
|
|
# body: Static build for x86_64-linux using MUSL
|