2022-04-05 21:18:25 +02:00
|
|
|
name: 'Publish to npm'
|
2022-04-05 21:09:03 +02:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*'
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [14.x]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Publish to npm
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
- run: |
|
|
|
|
yarn install --frozen-lockfile
|
|
|
|
- run: |
|
2022-04-20 23:38:55 +02:00
|
|
|
LATEST=$(npm show unleash-server version)
|
2022-04-20 23:45:02 +02:00
|
|
|
TAG=$(node scripts/npm-tag.js $LATEST)
|
2022-04-05 21:09:03 +02:00
|
|
|
npm publish --tag ${TAG:-latest}
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|