Skip to content

Commit b034fe1

Browse files
fix(ci): Create release before uploading
Signed-off-by: Taylor Thomas <taylor@cosmonic.com>
1 parent 2aa08cd commit b034fe1

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/publish-binaries.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,25 @@ jobs:
6262
shell: bash
6363
run: gh auth login --with-token < <(echo ${{ secrets.GITHUB_TOKEN }})
6464
- run: gh release upload -R bytecodealliance/wasm-pkg-tools --clobber dev target/${{ matrix.rust-target }}/release/wkg-${{ matrix.rust-target }}
65-
65+
66+
create_tagged_release:
67+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'bytecodealliance/wasm-pkg-tools'
68+
name: Create tagged release
69+
runs-on: ubuntu-latest
70+
permissions:
71+
contents: write
72+
steps:
73+
- name: Login GH CLI
74+
shell: bash
75+
run: gh auth login --with-token < <(echo ${{ secrets.GITHUB_TOKEN }})
76+
- run: gh release create -R bytecodealliance/wasm-pkg-tools ${{ github.ref_name }}
77+
6678
publish_tagged_release:
6779
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') && github.repository == 'bytecodealliance/wasm-pkg-tools'
6880
name: Publish to tagged release
6981
runs-on: ${{ matrix.os }}
82+
needs:
83+
- create_tagged_release
7084
strategy:
7185
matrix:
7286
include:

0 commit comments

Comments
 (0)