Skip to content

Commit

Permalink
add publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
smastrom committed Sep 5, 2024
1 parent 07efd95 commit 86f2f3c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish to NPM

on:
push:
tags: ['v*']
workflow_dispatch:

jobs:
chrome-tests:
uses: ./.github/workflows/tests.yml
publish:
needs: [chrome-tests]
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '21.x'
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: true
- name: Build
run: pnpm build
- name: Pack
run: rm -f *.tgz && npm pack
- name: Publish
run: npm publish *.tgz --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 86f2f3c

Please sign in to comment.