Skip to content

v0.5.0

v0.5.0 #35

Workflow file for this run

name: Rust Build
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
- name: Build and Copy Target
run: |
docker run --rm -v ${{ github.workspace }}:/app -w /app rust:1.69-bullseye \
sh -c "apt-get update && apt-get install -y build-essential && cargo build -p crosup --release \
"
- name: Show Artifacts
run: |
ls -la ${{ github.workspace }}/target/release
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Packaging final binary
shell: bash
run: |
sudo cp target/release/crosup crosup
sudo tar czvf crosup_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz crosup
sudo shasum -a 256 crosup_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz > crosup_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz.sha256
- name: Releasing assets
uses: softprops/action-gh-release@v1
with:
files: |
crosup_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz
crosup_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.tar.gz.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}