Publish Production Package #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | |