Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tyutjohn authored Nov 16, 2024
1 parent fe2c8d6 commit 403d58a
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish npm package

on:
push:
branches:
- main
- fix/memory

jobs:
publish:
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build

- name: Publish package
run: |
if [ "${{ github.ref }}" == "refs/heads/fix/memory" ]; then
npm publish --tag beta
else
npm publish
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 403d58a

Please sign in to comment.