Skip to content

Commit

Permalink
add automation for npm publish
Browse files Browse the repository at this point in the history
  • Loading branch information
aggre committed Dec 20, 2024
1 parent e45177c commit a8c7052
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish

on:
workflow_run:
workflows: ['Build']
branches: [main]
types:
- completed

jobs:
on-success:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: yarn install, and build
run: |
corepack enable
yarn install
yarn run build
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}

0 comments on commit a8c7052

Please sign in to comment.