Skip to content

Commit

Permalink
Merge pull request #162 from authzed/fix-release-workflow
Browse files Browse the repository at this point in the history
Fix release workflow
  • Loading branch information
tstirrat15 authored Oct 3, 2024
2 parents 863eca8 + 52bc0ad commit 07d2523
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on: # yamllint disable-line rule:truthy
jobs:
publish:
name: Publish to NPM
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -29,22 +27,28 @@ jobs:
# NOTE: this publishes an alternate version that doesn't depend on protobuf-ts/runtime
publish-js-client:
name: Publish JS client to NPM
needs: build-js-client
runs-on: ubuntu-latest
steps:
- name: Download js client build
uses: actions/download-artifact@v4
with:
name: js-client-18
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "yarn"
# Install deps in base package and build into js-dist
- uses: bahmutov/npm-install@v1
- name: Run build
run: yarn build-js-client
- uses: bahmutov/npm-install@v1
with:
working-directory: ./js-dist
- uses: battila7/get-version-action@v2
# Set the version in package.json to match the tag
- run: "npm version ${{ steps.get_version.outputs.version-without-v }}"
working-directory: ./js-dist
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
tag: ${{ steps.get_version.outputs.version }}
# Point at the js-dist directory as the working directory
package: js-dist
access: public
7 changes: 2 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
pull_request:
branches:
- "*"
merge_group:
types:
- "checks_requested"
jobs:
paths-filter:
runs-on: "buildjet-2vcpu-ubuntu-2204"
Expand All @@ -34,7 +31,7 @@ jobs:
node-version: [18, 20, 21]
needs: "paths-filter"
if: |
needs.paths-filter.outputs.codechange == 'true' || github.event_name == 'release'
needs.paths-filter.outputs.codechange == 'true'
steps:
- uses: actions/checkout@v4
- uses: "authzed/action-spicedb@v1"
Expand All @@ -57,7 +54,7 @@ jobs:
node-version: [18, 20, 21]
needs: "paths-filter"
if: |
needs.paths-filter.outputs.codechange == 'true' || github.event_name == 'release'
needs.paths-filter.outputs.codechange == 'true'
steps:
- uses: actions/checkout@v4
- uses: "authzed/action-spicedb@v1"
Expand Down

0 comments on commit 07d2523

Please sign in to comment.