-
Notifications
You must be signed in to change notification settings - Fork 2
112 lines (88 loc) · 2.92 KB
/
build-n-deploy.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
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
103
104
105
106
107
108
109
110
111
name: Build & Test
on:
pull_request:
branches: [ "master" ]
push:
branches: [ "master" ]
permissions:
contents: write
jobs:
build:
strategy:
matrix:
node-version: [20.x]
os: [ubuntu-latest]
runs-on: ${{matrix.os}}
# defaults:
# run:
# working-directory: ./packages/resizable-panes-react
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: |
npm install --legacy-peer-deps
- name: Lint/EsLint
run: |
npm run lint
- name: Resizable Core Build
run: |
npm run core:prod
- name: Resizable React/JS/Next libs Builds
run: |
npm run prod
- name: Resizable Demo App Build
run: |
npm run demo:prod
- name: Resizable React Testing
run: |
npm test
working-directory: ./packages/resizable-panes-react
- name: Resizable React Check Coverage
run: |
npm run coverage
working-directory: ./packages/resizable-panes-react
- name: Upload artifacts
if: always()
uses: actions/upload-artifact@v4
with:
path: ${{format('{0}/{1}', github.workspace, 'packages/resizable-panes-react/cypress/screenshots')}}
retention-days: 30
- name: Echo
run:
echo ${{format('{0}/{1}', github.workspace, 'packages/resizable-panes-react')}}
pwd
myVar=$(pwd)
echo $myVar
# - name: SonarCloud Scan
# uses: SonarSource/sonarcloud-github-action@master
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Demo App - Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/master' }}
uses: JamesIves/github-pages-deploy-action@4.1.0
with:
branch: gh-pages
folder: ~/work/resizable-panes/resizable-panes/packages/demo-app/docs
- name: Resizable React NPM Publish
if: ${{ github.ref == 'refs/heads/master' }}
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ${{format('{0}/{1}', github.workspace, 'packages/resizable-panes-react')}}
- name: Resizable JS NPM Publish
if: ${{ github.ref == 'refs/heads/master' }}
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ${{format('{0}/{1}', github.workspace, 'packages/resizable-panes-js')}}
- name: Resizable Next NPM Publish
if: ${{ github.ref == 'refs/heads/master' }}
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: ${{format('{0}/{1}', github.workspace, 'packages/resizable-panes-next')}}