@@ -36,27 +36,28 @@ jobs:
36
36
SKIP_RUST_BUILD : 1
37
37
run : pnpm install
38
38
39
- # - name: Create Release Pull Request or Publish to npm
40
- # id: changesets
41
- # uses: changesets/action@v1
42
- # with:
43
- # publish: pnpm release
44
- # env:
45
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46
- # NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
47
- #
48
- # - name: Check object
49
- # run: |
50
- # cat << OBJECT
51
- # ${{ toJson(steps.changesets.outputs) }}
52
- # OBJECT
39
+ - name : Create Release Pull Request or Publish to npm
40
+ id : changesets
41
+ uses : changesets/action@v1
42
+ with :
43
+ publish : pnpm release
44
+ env :
45
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
47
+
48
+ - name : Check object
49
+ run : |
50
+ cat << OBJECT
51
+ ${{ toJson(steps.changesets.outputs) }}
52
+ OBJECT
53
53
54
54
release-binaries :
55
55
needs : release
56
+ if : needs.release.outputs.published == 'true'
56
57
name : Build binaries for ${{matrix.target}}
57
58
runs-on : ${{matrix.runner}}
58
59
env :
59
- PUBLISHED_VERSION : 0.1.2
60
+ PUBLISHED_VERSION : ${{ fromJson(needs.release.outputs.publishedPackages)[0].version }}
60
61
COREPACK_ENABLE_STRICT : 0
61
62
strategy :
62
63
fail-fast : false
@@ -133,7 +134,6 @@ jobs:
133
134
mkdir -p generated/${{matrix.target}}
134
135
pnpm run build:rust --target=${{matrix.target}}
135
136
cp index.node generated
136
- ls -lR generated
137
137
138
138
- name : Package artifact
139
139
id : package-artifact
@@ -149,6 +149,7 @@ jobs:
149
149
- name : Upload artifact (development only)
150
150
id : upload-artifact
151
151
uses : actions/upload-artifact@v4
152
+ if : needs.release.outputs.published != 'true'
152
153
with :
153
154
name : ${{ steps.package-artifact.outputs.archive }}
154
155
path : generated/${{ steps.package-artifact.outputs.archive }}
@@ -166,6 +167,7 @@ jobs:
166
167
https://api.github.com/repos/${{ github.repository }}/releases/tags/v${{ env.PUBLISHED_VERSION }} | jq '.id')" >> "$GITHUB_OUTPUT"
167
168
168
169
- name : Upload release asset
170
+ if : needs.release.outputs.published == 'true'
169
171
shell : bash
170
172
env :
171
173
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments