Skip to content

Commit

Permalink
ci(npm): add GitHub actions npm deployment scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
enylin committed May 26, 2024
1 parent 03b08ae commit 46b0898
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release to npm

on:
release:
types: [created]

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Test
run: npm run test

- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish

0 comments on commit 46b0898

Please sign in to comment.