This commit is contained in:
2023-08-31 22:29:20 +03:00
parent b885d494fd
commit f5df314095

View File

@@ -23,11 +23,15 @@ jobs:
uses: gmiam/rust-musl-action@master uses: gmiam/rust-musl-action@master
with: with:
args: cargo build --target $BUILD_TARGET --release args: cargo build --target $BUILD_TARGET --release
- name: Get version
run: echo "VERSION=$(grep -P '^version = \"\d+\.\d+\.\d+\"' Cargo.toml | awk -F '\"' '{print $2}')" >> $GITHUB_ENV
- name: Show version
run: echo ${{ env.VERSION }}
- uses: actions/upload-artifact@v2 - uses: actions/upload-artifact@v2
name: Upload artifact name: Upload artifact
with: with:
name: ${{ env.BINARY_NAME }}_x86_64-linux-musl name: ${{ env.BINARY_NAME }}_${{ env.VERSION }}_${{ env.BUILD_TARGET }}
path: target/x86_64-unknown-linux-musl/release/${{ env.BINARY_NAME }} path: target/${{ env.BUILD_TARGET }}/release/${{ env.BINARY_NAME }}
build_arch: build_arch:
name: Arch Linux package name: Arch Linux package
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -38,21 +42,28 @@ jobs:
permissions: permissions:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: actions/download-artifact@master - name: Get version
id: download_binary run: echo "VERSION=$(grep -P '^version = \"\d+\.\d+\.\d+\"' Cargo.toml | awk -F '\"' '{print $2}')" >> $GITHUB_ENV
with: - uses: actions/download-artifact@master
name: ${{ env.BINARY_NAME }}_x86_64-linux-musl name: Download
path: ${{ env.BINARY_NAME }}_x86_64-linux-musl id: download_binary
- name: Move binary with:
run: | name: ${{ env.BINARY_NAME }}_${{ env.VERSION }}_${{ env.BUILD_TARGET }}
mkdir -p target/x86_64-unknown-linux-musl/release/ path: ${{ env.BINARY_NAME }}_${{ env.VERSION }}_${{ env.BUILD_TARGET }}
mv ${{ env.BINARY_NAME }}_x86_64-linux-musl/rexec target/x86_64-unknown-linux-musl/release/ - name: Move binary
- name: Install build deps run: |
run: | mkdir -p target/${{ env.BUILD_TARGET }}/release/
ls -lah mv ${{ env.BINARY_NAME }}_${{ env.VERSION }}_${{ env.BUILD_TARGET }}/rexec target/${{ env.BUILD_TARGET }}/release/
makepkg -f - name: Build ZST package
ls -lah run: |
makepkg -f
- uses: actions/upload-artifact@v2
name: Upload artifact
with:
name: ${{ env.BINARY_NAME }}_${{ env.VERSION }}_${{ env.BUILD_TARGET }}.zst
path: *zst
# release: # release:
# name: Release binary # name: Release binary