init #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
- push | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
name: Build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: '1.76.0' | |
target: wasm32-wasi | |
- name: Install WasmEdge | |
run: ./.github/workflows/install-wasmedge.sh | |
- name: Install build dependencies | |
run: ./build.sh dependencies | |
- name: Build | |
run: ./build.sh build | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifacts | |
path: | | |
dist/* | |
release: | |
if: startsWith(github.ref, 'refs/tags/v') | |
name: Release | |
needs: build | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
merge-multiple: true | |
- name: Install crane | |
run: ./.github/workflows/install-crane.sh | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release | |
run: ./build.sh release | |
- name: Release binary artifact | |
uses: ncipollo/release-action@v1 | |
with: | |
bodyFile: dist/release-notes.md | |
artifacts: dist/*.tgz | |
token: ${{ secrets.GITHUB_TOKEN }} |