release(js): v0.2.0-beta.22 (#362) #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release (JS) | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "pkg/js/v*" | |
jobs: | |
test: | |
uses: ./.github/workflows/pkg-js-build.yaml | |
secrets: inherit | |
publish: | |
needs: [test] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
defaults: | |
run: | |
working-directory: "pkg/js" | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
path: "." | |
## TODO: We need to comment these out b/c we are copying the main README as part of the publish process | |
## Once we have a README specific to the JS package, we can re-include them | |
# sparse-checkout: "pkg/js" | |
# sparse-checkout-cone-mode: false | |
- name: Set up node | |
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4 | |
with: | |
node-version: 20 | |
registry-url: "https://registry.npmjs.org" | |
scope: "@openfga" | |
always-auth: false | |
cache: "npm" | |
cache-dependency-path: ./pkg/js/package-lock.json | |
- name: Install dependencies | |
run: npm ci | |
- name: Publish to npm | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
release: | |
runs-on: ubuntu-latest | |
needs: [publish] | |
permissions: | |
contents: write | |
packages: write # publish a new github release | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
fetch-depth: 0 | |
- uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803 # v3.0.1 | |
with: | |
version_regex: ^pkg/js/v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+ | |
prerelease_regex: ^pkg/js/v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+-(alpha|beta)\.[[:digit:]]+$ | |
changelog_file: pkg/js/CHANGELOG.md | |
create_draft: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |