-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (86 loc) · 2.82 KB
/
ci.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
name: CI
on:
push:
branches: [develop, master, next, beta, alpha]
pull_request:
branches: [develop, master, next, beta, alpha]
permissions:
packages: write
contents: write
issues: write
pull-requests: write
env:
PRIMARY_NODE_VERSION: 18
jobs:
install:
name: Checkout and Install
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/install
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
build:
name: Build
needs: [install]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/install
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
- name: Build
uses: ./.github/actions/build
test:
name: Test
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install
uses: ./.github/actions/install
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
- name: Build
uses: ./.github/actions/build
- name: Build an image
run: npm run cli -- build python/base
release:
name: Release
needs: [build, test]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install
uses: ./.github/actions/install
with:
node-version: ${{ env.PRIMARY_NODE_VERSION }}
- name: Build
uses: ./.github/actions/build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
- name: Webhook BETA
uses: distributhor/workflow-webhook@v3
if: ${{ github.ref_name == 'beta' }}
env:
webhook_url: ${{ secrets.WEBHOOK_DEV_URL }}
webhook_secret: ${{ secrets.WEBHOOK_DEV_SECRET }}
verbose: true
- name: Webhook PROD
uses: distributhor/workflow-webhook@v3
if: ${{ github.ref_name == 'master' }}
env:
webhook_url: ${{ secrets.WEBHOOK_PROD_URL }}
webhook_secret: ${{ secrets.WEBHOOK_PROD_SECRET }}
verbose: true