-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (51 loc) · 1.54 KB
/
develop.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
53
54
55
56
57
58
59
60
61
62
63
64
name: Deployment
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
# Cancel in-progress builds on PRs, but not on staging deploys.
cancel-in-progress: ${{ github.ref != 'main' }}
jobs:
deployment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Environment
run: .github/scripts/set-environment.sh
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: |
yarn install --network-timeout 100000
git checkout -- package.json
- name: linter
run: yarn lint
- name: unit tests
run: yarn test
- name: build
run: yarn build-dist
- name: license report
run: yarn license-report-dist
- name: Prune package.json
run: |
cd dist
npm pkg delete scripts
npm pkg delete devDependencies
npm pkg delete eslintConfig
npm pkg delete resolutions
npm pkg delete browserslist
pwd
cat `pwd`/package.json
- name: compare artifact package version
run: .github/scripts/compare-artifact-package-versions.sh
- name: publish npm package
if: env.UPDATE_NPM_PACKAGE == 'true'
run: cd dist && npm publish --scope @terraware
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_AUTH_TOKEN }}