Skip to content

Commit

Permalink
build: Split publish release to npm to separate workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
nzdjb committed Oct 17, 2023
1 parent 317e45b commit 8be35fb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish Release To NPM
on:
release:
types: [published]

jobs:
publish-release-to-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: yarn install --immutable
- run: yarn config set npmAuthToken ${NODE_AUTH_TOKEN}
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- run: yarn npm publish
if: ${{ steps.release.outputs.release_created }}
11 changes: 1 addition & 10 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: yarn install --immutable
- uses: google-github-actions/release-please-action@v3
id: release
with:
Expand All @@ -30,8 +25,4 @@ jobs:
labels: |
autorelease: pending
automerge
- run: yarn config set npmAuthToken ${NODE_AUTH_TOKEN}
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- run: yarn npm publish
if: ${{ steps.release.outputs.release_created }}

0 comments on commit 8be35fb

Please sign in to comment.