Update release workflow

This commit is contained in:
Jack
2023-06-02 04:41:25 +01:00
parent ec66ea0af3
commit 04bb4474bf

View File

@ -2,12 +2,6 @@ on:
push: push:
tags: tags:
- '*.*.*' - '*.*.*'
workflow_dispatch:
inputs:
tag:
description: 'Test scenario tags'
required: true
type: string
permissions: permissions:
contents: write contents: write
@ -18,38 +12,34 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3.3.0 - uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with: - uses: dtolnay/rust-toolchain@stable
toolchain: stable
- name: Install wasm-bindgen-cli - name: Install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli --git https://github.com/fenjalien/wasm-bindgen.git --rev 584383028e0fdb4bad927b4f886714ddfad2cd95 run: cargo install wasm-bindgen-cli
- name: Install wasm-pack - name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v3.6.0 uses: actions/setup-node@v3
with: with:
node-version: latest node-version: latest
- name: Install Dependencies - name: Install Dependencies
run: npm install run: npm install
- name: Build - name: Build
run: npm run wasm-build run: npm run wasm-build
- name: Release
if: ${{github.ref_type == 'tag'}} - name: Create release
uses: softprops/action-gh-release@v0.1.15 env:
with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref_name }} run: |
files: | tag="${GITHUB_REF#refs/tags/}"
main.js
styles.css gh release create "$tag" \
manifest.json --title="$tag" \
- name: Manual Release --draft \
if: ${{github.ref_type != 'tag'}} main.js manifest.json styles.css
uses: softprops/action-gh-release@v0.1.15
with:
tag_name: ${{ inputs.tag }}
files: |
main.js
styles.css
manifest.json