-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 1.57 KB
/
main.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
### Generated with ChatGPT maybe has errors
name: Build and Release
on:
push:
branches:
- main
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '21.6.2'
- name: Setup
run: |
npm install
npm ci --cache .npm
id: cache-deps
- name: Generate openapi
run: |
npm run openapi:bundle
npm run openapi:types
- name: Test types
run: |
npm run test:ts
- name: Units tests
run: |
npm run test:units:coverage
- name: Functional tests
run: |
npm run test:functionals
- name: Build server package
run: |
npm run server:build
id: cache-server-build
- name: Build package
run: |
npm run package:build
id: cache-package-build
- name: Release
run: |
cd package
npx semantic-release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }} # Token for generate tags on the repo
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} # Token for publish on npmjs.com