Skip to content

Commit 07d2523

Browse files
authored
Merge pull request #162 from authzed/fix-release-workflow
Fix release workflow
2 parents 863eca8 + 52bc0ad commit 07d2523

2 files changed

Lines changed: 13 additions & 12 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on: # yamllint disable-line rule:truthy
88
jobs:
99
publish:
1010
name: Publish to NPM
11-
needs:
12-
- test
1311
runs-on: ubuntu-latest
1412
steps:
1513
- uses: actions/checkout@v4
@@ -29,22 +27,28 @@ jobs:
2927
# NOTE: this publishes an alternate version that doesn't depend on protobuf-ts/runtime
3028
publish-js-client:
3129
name: Publish JS client to NPM
32-
needs: build-js-client
3330
runs-on: ubuntu-latest
3431
steps:
35-
- name: Download js client build
36-
uses: actions/download-artifact@v4
37-
with:
38-
name: js-client-18
32+
- uses: actions/checkout@v4
3933
- uses: actions/setup-node@v4
4034
with:
4135
node-version: 18
36+
cache: "yarn"
37+
# Install deps in base package and build into js-dist
4238
- uses: bahmutov/npm-install@v1
39+
- name: Run build
40+
run: yarn build-js-client
41+
- uses: bahmutov/npm-install@v1
42+
with:
43+
working-directory: ./js-dist
4344
- uses: battila7/get-version-action@v2
4445
# Set the version in package.json to match the tag
4546
- run: "npm version ${{ steps.get_version.outputs.version-without-v }}"
47+
working-directory: ./js-dist
4648
- uses: JS-DevTools/npm-publish@v3
4749
with:
4850
token: ${{ secrets.NPM_TOKEN }}
4951
tag: ${{ steps.get_version.outputs.version }}
52+
# Point at the js-dist directory as the working directory
53+
package: js-dist
5054
access: public

.github/workflows/test.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
pull_request:
77
branches:
88
- "*"
9-
merge_group:
10-
types:
11-
- "checks_requested"
129
jobs:
1310
paths-filter:
1411
runs-on: "buildjet-2vcpu-ubuntu-2204"
@@ -34,7 +31,7 @@ jobs:
3431
node-version: [18, 20, 21]
3532
needs: "paths-filter"
3633
if: |
37-
needs.paths-filter.outputs.codechange == 'true' || github.event_name == 'release'
34+
needs.paths-filter.outputs.codechange == 'true'
3835
steps:
3936
- uses: actions/checkout@v4
4037
- uses: "authzed/action-spicedb@v1"
@@ -57,7 +54,7 @@ jobs:
5754
node-version: [18, 20, 21]
5855
needs: "paths-filter"
5956
if: |
60-
needs.paths-filter.outputs.codechange == 'true' || github.event_name == 'release'
57+
needs.paths-filter.outputs.codechange == 'true'
6158
steps:
6259
- uses: actions/checkout@v4
6360
- uses: "authzed/action-spicedb@v1"

0 commit comments

Comments
 (0)