Skip to content

Commit

Permalink
Add publish script
Browse files Browse the repository at this point in the history
  • Loading branch information
onigoetz committed May 3, 2024
1 parent 3a316e7 commit d5daf6b
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish Package to npmjs
on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/[email protected]
with:
node-version: '18.x'
# required for credentials to be taken in account
registry-url: 'https://registry.npmjs.org'
- name: Install latest npm
run: npm install -g npm
- name: Install
run: yarn install
- name: Build
run: yarn build
- name: Test
run: yarn test
- name: Publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit d5daf6b

Please sign in to comment.