This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
59 lines (57 loc) · 1.91 KB
/
public-packages-publish-workflow.yaml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Public Packages publish workflow
on:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install npm v8
run: npm install -g npm@8
- name: Install dependencies
run: npm install
- name: Lerna link
run: npm run link
env:
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}}
- name: Lerna bootstrap
run: npm run bootstrap
env:
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}}
- name: Lerna checkLicenses
run: npm run checkLicenses
env:
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}}
- name: Build the package
run: npm run build
env:
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}}
- name: Lint packages
run: npm run lint
- name: Run tests
run: npm test
env:
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}}
TEST_SECRETS: ${{secrets.INTEGRATION_TEST_SECRETS}}
TESTMAIL_API_KEY: ${{secrets.TESTMAIL_API_KEY}}
TESTMAIL_NS: ${{secrets.TESTMAIL_NS}}
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: "https://registry.npmjs.org"
scope: "@affinidi"
- name: Install npm v8
run: npm install -g npm@8
- name: Publish to npmjs.org
# more info: https://github.com/lerna/lerna/issues/2788
run: npm run publish from-package -- --yes --registry https://registry.npmjs.org/ --no-verify-access
env:
NODE_AUTH_TOKEN: ${{secrets.PUBLIC_NPM_NODE_AUTH_TOKEN}}
TEST_SECRETS: ${{secrets.INTEGRATION_TEST_SECRETS}}
TESTMAIL_API_KEY: ${{secrets.TESTMAIL_API_KEY}}
TESTMAIL_NS: ${{secrets.TESTMAIL_NS}}