This commit is contained in:
2023-08-31 21:07:02 +03:00
parent 5a4bf1f784
commit a040881cfa
2 changed files with 36 additions and 60 deletions

View File

@ -1,8 +1,8 @@
name: Rust static build and publish name: Rust static build and publish
on: on: ["push"]
push: # push:
tags: # tags:
- '*' # - '*'
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
BUILD_TARGET: x86_64-unknown-linux-musl BUILD_TARGET: x86_64-unknown-linux-musl
@ -29,52 +29,38 @@ jobs:
name: ${{ env.BINARY_NAME }}_x86_64-linux-musl name: ${{ env.BINARY_NAME }}_x86_64-linux-musl
path: target/x86_64-unknown-linux-musl/release/${{ env.BINARY_NAME }} path: target/x86_64-unknown-linux-musl/release/${{ env.BINARY_NAME }}
# build_arch: build_arch:
# name: Arch Linux package name: Arch Linux package
# runs-on: ubuntu-latest runs-on: ubuntu-latest
# permissions: container:
# contents: write image: archlinux
# steps: permissions:
# - uses: actions/checkout@v3 contents: write
# - name: Install latest nightly steps:
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# override: true
# target: x86_64-unknown-linux-musl
# components: rustfmt
# - name: Install cargo-aur
# run: cargo install cargo-aur
# - name: Build PKGBUILD
# uses: actions-rs/cargo@v1
# with:
# command: aur
# - uses: actions/upload-artifact@v2
# name: Upload artifact PKGBUILD
# with:
# path: PKGBUILD
# name: PKGBUILD
release:
name: Release binary
needs: ["build"]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/download-artifact@master - uses: actions/download-artifact@master
name: Download built binary
id: download_binary id: download_binary
with: with:
name: ${{ env.BINARY_NAME }}_x86_64-linux-musl name: ${{ env.BINARY_NAME }}_x86_64-linux-musl
path: ${{ env.BINARY_NAME }}_x86_64-linux-musl path: ${{ env.BINARY_NAME }}_x86_64-linux-musl
# - uses: actions/download-artifact@master - name: List
# id: download_pkgbuild run: ls -lah
# with:
# name: PKGBUILD # release:
# path: PKGBUILD # name: Release binary
- uses: ncipollo/release-action@v1 # needs: ["build", "build_arch"]
name: Update release page # runs-on: ubuntu-latest
with: # permissions:
artifacts: "${{ steps.download_binary.outputs.download-path }}/*" # contents: write
allowUpdates: true # steps:
body: Static build for x86_64-linux using MUSL # - 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

View File

@ -8,18 +8,8 @@ license=("WTFPL")
arch=("x86_64") arch=("x86_64")
makedepends=("rustup") makedepends=("rustup")
pkgver() {
echo "$pkgver" | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
return 0
}
package() { package() {
cd .. install -Dm755 "$startdir/target/x86_64-unknown-linux-musl/release/rexec" "$pkgdir/usr/bin/rexec"
usrdir="$pkgdir/usr"
mkdir -p $usrdir
cargo install --target=x86_64-unknown-linux-musl --no-track --path . --root "$usrdir"
} }