Skip to content

Publish Production Package #3

Publish Production Package

Publish Production Package #3

Workflow file for this run

name: Publish Production Package
on:
workflow_dispatch:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
environment:
name: Production
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
persist-credentials: false
ref: beta
- name: Setup npmrc
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies
uses: borales/actions-yarn@v4
with:
cmd: install
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish
run: |
npm publish --tag latest
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}