-
Notifications
You must be signed in to change notification settings - Fork 9
61 lines (49 loc) · 1.48 KB
/
build.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
name: CI/CD
on:
push:
branches:
- master # Cambia questo in base al tuo branch predefinito
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-tags: true
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Dependencies
run: |
rm -rf dist
yarn install --frozen-lockfile --non-interactive
export PATH=$HOME/.yarn/bin:$PATH
- name: Lint
run: yarn lint
- name: Build
run: ./scripts/build.mjs
- name: Unit tests
run: yarn test:ci
- name: E2E tests
run: ./scripts/e2e-ci.mjs
- name: Build release
run: |
./scripts/release.mjs
./scripts/jenkins/create-build-artifacts.mjs
mkdir -p build-artifacts
mv dist/artifacts/**/*.tgz build-artifacts/
zip -r build-artifacts.zip build-artifacts
- name: Upload Artifacts
uses: actions/upload-artifact@v4.4.3
with:
name: build-artifacts
path: build-artifacts.zip
# - name: Publish snapshots
#if: github.ref == 'refs/heads/main' # Cambia questo in base al tuo branch predefinito
#run: ./scripts/jenkins/publish-snapshots.sh
- name: Publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: ./scripts/publish.mjs