zip release package #12
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: Rust | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install wasm-pack | |
run: cargo install wasm-pack | |
- name: Build | |
run: RUSTFLAGS=--cfg=web_sys_unstable_apis wasm-pack build --target web | |
- name: Upload build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: package | |
path: pkg/ | |
release: | |
name: Upload Latest Build | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/download-artifact@v3 | |
- run: zip -r wgpu-gen4ids.zip ./package/ | |
- uses: pyTooling/Actions/releaser@main | |
with: | |
tag: latest | |
rm: true | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: /home/runner/work/wgpu-gen4ids/wgpu-gen4ids/wgpu-gen4ids.zip | |
- name: Summary | |
run: | | |
cat <<EOF >> $GITHUB_STEP_SUMMARY | |
<https://github.com/Lincoln-LM/wgpu-gen4ids/releases/tag/latest> | |
EOF |