Skip to content

Commit

Permalink
Add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hildjj committed Sep 5, 2024
1 parent 905519e commit 31c863a
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 Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- run: pnpm all:link
- run: pnpm i -r
- run: npm run all:check
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs
publish_branch: gh-pages
destination_dir: docs
- run: npm pkg delete devDependencies -ws
- run: npm publish --access public --provenance -ws
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 31c863a

Please sign in to comment.