Skip to content

Commit

Permalink
ci: Add publish-on-release action
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Aug 17, 2023
1 parent caa15ff commit fcf9b48
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: On release

on:
release:
types: [created]

jobs:
publish-to-npm:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Check out commit
uses: actions/checkout@v3

- name: Set up pnpm
uses: pnpm/action-setup@v2.2.4

- name: Set up Node 18
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org

- name: Produce dist
run: |
pnpm install --frozen-lockfile
pnpm build
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit fcf9b48

Please sign in to comment.