-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.36 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
44
45
46
47
48
49
50
51
52
name: Publish Packages
on:
push:
branches:
- master
jobs:
publish-to-npm:
runs-on: ubuntu-latest
steps:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- uses: nrwl/nx-set-shas@v3
with:
main-branch-name: 'master'
- uses: fregante/setup-git-user@v2
# - run: git config --global user.email "[email protected]"
# - run: git config --global user.name "Github Action"
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Formt Check
run: npx nx format:check
- name: Lint
run: npx nx affected --target=lint --parallel=1
- name: Build
run: npx nx affected --target=build --parallel=1
- name: Test
run: npx nx affected --target=test --parallel=1
- name: Create version and publish
run: npx nx affected --target=version --parallel=1
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
- name: Push to repo
run: git push https://${{ secrets.GH_PAT_WEBMASTER }}@github.com/ROvACC/rovacc-nodejs-packages.git HEAD:master