-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (40 loc) · 1.27 KB
/
publish-to-npm-reg.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
name: Publish Package to npmjs
on:
push:
branches:
- dev
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
packages: [sdk,types]
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
scope: 'nhussain'
#- run: npm ci
#- run: npm install
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
with:
path: ./packages/${{ matrix.packages }}
- name: Install Nx CLI
run: npm install -g nx
- name: Install dependencies
run: npm install
- name: Build Nx Project
run: nx build @peaq-network/${{ matrix.packages }}
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish ${{ matrix.packages }}
#working-directory: ./packages/
run: |
node tools/scripts/publish.mjs @peaq-network/${{ matrix.packages }} ${{ steps.package-version.outputs.current-version}} latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}