Skip to content

Publish to npm

Publish to npm #47

Workflow file for this run

name: 'Publish to npm'
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Enable corepack
run: corepack enable
- name: Publish to npm
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- run: |
yarn install --immutable
- run: |
LATEST=$(npm show @unleash/proxy version)
TAG=$(node scripts/npm-tag.js $LATEST)
npm publish --tag ${TAG:-latest}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}