-
Notifications
You must be signed in to change notification settings - Fork 10
56 lines (47 loc) · 1.61 KB
/
cadastrapp.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
name: "cadastrapp"
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: "checking out"
uses: actions/checkout@v2
- name: Checkout submodules
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: "setting up npm"
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: "cache node modules"
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: "install dependencies"
run: npm install
- name: "build"
run: npm run ext:build
- name: "publish zip as artifact"
uses: actions/upload-artifact@v4
with:
name: Cadastrapp-${{ github.sha }}
path: dist/Cadastrapp.zip
- name: "change webpack config to avoid minification"
run: |
sed -i -e 's/prod: true/prod: false/' build/extension/prod-webpack.config.js
- name: "build unminified"
run: npm run ext:build
- name: "publish zip as artifact"
uses: actions/upload-artifact@v4
with:
name: Cadastrapp-unminified-${{ github.sha }}
path: dist/Cadastrapp.zip