Skip to content

Commit

Permalink
Merge pull request #4 from yoichiro/add-workflow-to-publish
Browse files Browse the repository at this point in the history
Add a new workflow to publish this to npm repository.
  • Loading branch information
yoichiro authored Jun 30, 2024
2 parents 7e6fc78 + e362db5 commit f0cadaf
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish
on:
push:
tags:
- "v*"
jobs:
publish:
name: Node.js ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
node-version: [20.x]
os: [ubuntu-latest]
permissions:
contents: read
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }} 🔧
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit f0cadaf

Please sign in to comment.