Skip to content

Zig is not used yet

Zig is not used yet #2

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, windows-latest]
include:
- os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
target_alias: linux-x86_64
bin_suffix: ''
archive_suffix: '.tar.bz2'
- os: windows-latest
target: x86_64-pc-windows-msvc
target_alias: win-x86_64-msvc
bin_suffix: '.exe'
archive_suffix: '.zip'
defaults:
run:
shell: bash
env:
ARCHIVE_PATH: wasi-update_${{ github.ref_name }}_${{ matrix.target_alias }}${{ matrix.archive_suffix }}
steps:
- uses: actions/checkout@v4
- uses: hecrj/setup-rust-action@v2
with:
rust-version: stable
targets: ${{ matrix.target }}
- name: Check Cargo availability
run: cargo --version
- name: Check Rustup default toolchain
run: rustup default | grep stable
- name: Build
run: |
make
install -d wasi-update
install -bin/wasi-update* wasi-update/
if [ "${{ matrix.os }}" = "ubuntu-20.04" ]; then
tar cjpf ${ARCHIVE_PATH} wasi-update
elif [ "${{ matrix.os }}" = "windows-latest" ]; then
"/C/Program Files/7-Zip/7z" a ${ARCHIVE_PATH} wasi-update
fi
- name: Install cargo-deb and build Debian package
if: ${{ matrix.os == 'ubuntu-20.04' }}
run: |
cargo install cargo-deb
cargo deb --output=wasi-update_${{ github.ref_name }}_amd64.deb --no-build
- uses: actions/upload-artifact@v4
with:
name: wasi-update_${{ matrix.target_alias }}
path: ${{ env.ARCHIVE_PATH }}
- uses: actions/upload-artifact@v4
if: ${{ matrix.os == 'ubuntu-20.04' }}
with:
name: wasi-update_deb-amd64
path: wasi-update_${{ github.ref_name }}_amd64.deb
release:
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v4
- name: Create release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: Release ${{ github.ref_name }}
draft: true
prerelease: false
files: |
wasi-update_deb-amd64/*.deb
wasi-update_linux-x86_64/*.tar.bz2
wasi-update_win-x86_64-msvc/*.zip