Skip to content

action fix

action fix #59

name: Build and Publish NPM Package
on:
push:
branches:
- develop
- main
jobs:
deploy-beta:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm install
- name: Build
run: npm ci && npm run build:prod
- name: Publish to npm (beta version)
run: npm run npm:publish:beta
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
deploy-release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm install
- name: Build
run: npm ci && npm run build:prod
- name: Publish to npm (release version)
run: npm run npm:publish:latest
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}