diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 32243e5..5eba784 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,12 +2,6 @@ on: push: tags: - '*.*.*' - workflow_dispatch: - inputs: - tag: - description: 'Test scenario tags' - required: true - type: string permissions: contents: write @@ -18,38 +12,34 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3.3.0 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - uses: actions/checkout@v3 + + - uses: dtolnay/rust-toolchain@stable + - 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 run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh - + - name: Setup Node - uses: actions/setup-node@v3.6.0 + uses: actions/setup-node@v3 with: node-version: latest + - name: Install Dependencies run: npm install + - name: Build run: npm run wasm-build - - name: Release - if: ${{github.ref_type == 'tag'}} - uses: softprops/action-gh-release@v0.1.15 - with: - tag_name: ${{ github.ref_name }} - files: | - main.js - styles.css - manifest.json - - name: Manual Release - if: ${{github.ref_type != 'tag'}} - uses: softprops/action-gh-release@v0.1.15 - with: - tag_name: ${{ inputs.tag }} - files: | - main.js - styles.css - manifest.json + + - name: Create release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + tag="${GITHUB_REF#refs/tags/}" + + gh release create "$tag" \ + --title="$tag" \ + --draft \ + main.js manifest.json styles.css \ No newline at end of file