-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (37 loc) · 1.05 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Build binaries for macOS and Linux, publish Node.js packages, create release
name: build-publish-release
on:
push:
branches:
- main
jobs:
publish-node-packages:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Build and publish to npm registry
run: |
npm ci
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://npm.pkg.github.com'
scope: "@baselime"
- run: echo "registry=https://npm.pkg.github.com/@baselime" >> .npmrc
- name: Publish to GitHub registry
continue-on-error: true
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}