Skip to content

Commit

Permalink
add action
Browse files Browse the repository at this point in the history
  • Loading branch information
axuj committed Jul 2, 2024
1 parent 4ebd8a1 commit 362b12c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish to npm

on:
push:
branches:
- main

jobs:
build-and-publish:
runs-on: ubuntu-latest

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

- name: Install PNPM
uses: pnpm/[email protected]
with:
version: 9.4.0

- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 20
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Authenticate to npm registry
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
pnpm build
pnpm publish
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 362b12c

Please sign in to comment.