-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (87 loc) · 2.55 KB
/
Copy pathci.yml
File metadata and controls
102 lines (87 loc) · 2.55 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Main CI
on:
push:
branches:
- main
# pull_request:
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 20
cache: 'npm'
- run: npx nx-cloud start-ci-run
- run: yarn install --frozen-lockfile
- uses: nrwl/nx-set-shas@v3
- run: npx nx-cloud record -- nx format:check
- run: npx nx run-many -t lint test build --no-agents
- uses: actions/upload-artifact@v4
with:
# Name of the artifact to upload.
# Optional. Default is 'artifact'
name: dist-and-coverage-artifact
# A file, directory or wildcard pattern that describes what to upload
# Required.
path: |
dist
coverage
package.json
# main:
# name: Nx Cloud - Main Job
# uses: nrwl/ci/.github/workflows/nx-cloud-main.yml@v0.11.3
# secrets:
# NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# with:
# main-branch-name: main
# number-of-agents: 3
# init-commands: |
# yarn nx-cloud start-ci-run --stop-agents-after="build" --agent-count=3
# parallel-commands: |
# yarn nx-cloud record -- yarn nx format:check
# parallel-commands-on-agents: |
# yarn nx lint harbor-master
# yarn nx test harbor-master --ci --codeCoverage
# yarn nx build harbor-master
# artifacts-path: |
# dist
# coverage
# package.json
# artifacts-name: dist-and-coverage-artifacts
# node-version: '20'
# agents:
# name: Nx Cloud - Agents
# uses: nrwl/ci/.github/workflows/nx-cloud-agents.yml@v0.11.3
# secrets:
# NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# with:
# number-of-agents: 3
# node-version: '20'
release:
runs-on: ubuntu-latest
needs:
- main
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/download-artifact@v4
with:
name: dist-and-coverage-artifact
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- run: yarn install --frozen-lockfile
- name: Release
run: |
npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}