-
Notifications
You must be signed in to change notification settings - Fork 487
131 lines (125 loc) · 5.06 KB
/
NIGHTLY.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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: NIGHTLY
on:
schedule:
- cron: '0 18 * * *'
jobs:
build_nightly:
name: Build nightly
strategy:
matrix:
include:
- os: ubuntu-latest
files:
- 'dist/camunda-modeler-nightly-linux-x64.tar.gz'
- os: macos-latest
files:
- 'dist/camunda-modeler-nightly-mac-arm64.dmg'
- 'dist/camunda-modeler-nightly-mac-arm64.zip'
- 'dist/camunda-modeler-nightly-mac-x64.dmg'
- 'dist/camunda-modeler-nightly-mac-x64.zip'
- os: windows-2022
files:
- 'dist/camunda-modeler-nightly-win-ia32.zip'
- 'dist/camunda-modeler-nightly-win-x64.zip'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Import Secrets
id: secrets
uses: hashicorp/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
exportEnv: false
secrets: |
secret/data/products/desktop-modeler/ci/sentry SENTRY_AUTH_TOKEN;
secret/data/products/desktop-modeler/ci/sentry SENTRY_DSN;
secret/data/products/desktop-modeler/ci/sentry SENTRY_ORG;
secret/data/products/desktop-modeler/ci/sentry SENTRY_PROJECT;
secret/data/common/jenkins/downloads-camunda-cloud_google_sa_key DOWNLOAD_CENTER_GCLOUD_KEY_BYTES | GCP_CREDENTIALS_NAME;
- name: Build nightly (Linux)
if: ${{ runner.os == 'Linux' }}
env:
CSC_LINK: "${{ secrets.CSC_LINK }}"
CSC_KEY_PASSWORD: "${{ secrets.CSC_KEY_PASSWORD }}"
MIXPANEL_TOKEN: "${{ secrets.MIXPANEL_PROJECT_TOKEN }}"
MIXPANEL_STAGE: "int"
NIGHTLY: 1
SENTRY_AUTH_TOKEN: "${{ steps.secrets.outputs.SENTRY_AUTH_TOKEN }}"
SENTRY_DSN: "${{ steps.secrets.outputs.SENTRY_DSN }}"
SENTRY_ORG: "${{ steps.secrets.outputs.SENTRY_ORG }}"
SENTRY_PROJECT: "${{ steps.secrets.outputs.SENTRY_PROJECT }}"
UPDATES_SERVER_PRODUCT_NAME: "${{ secrets.UPDATES_SERVER_PRODUCT_NAME }}"
run: npm run build -- --linux
- name: Build nightly (MacOS)
if: ${{ runner.os == 'macOS' }}
env:
APPLE_DEVELOPER_ID: "${{ secrets.APPLE_DEVELOPER_ID }}"
APPLE_DEVELOPER_ID_PASSWORD: "${{ secrets.APPLE_DEVELOPER_ID_PASSWORD }}"
APPLE_TEAM_ID: "${{ secrets.APPLE_TEAM_ID }}"
CSC_LINK: "${{ secrets.CSC_LINK }}"
CSC_KEY_PASSWORD: "${{ secrets.CSC_KEY_PASSWORD }}"
MIXPANEL_TOKEN: "${{ secrets.MIXPANEL_PROJECT_TOKEN }}"
MIXPANEL_STAGE: "int"
NIGHTLY: 1
SENTRY_AUTH_TOKEN: "${{ steps.secrets.outputs.SENTRY_AUTH_TOKEN }}"
SENTRY_DSN: "${{ steps.secrets.outputs.SENTRY_DSN }}"
SENTRY_ORG: "${{ steps.secrets.outputs.SENTRY_ORG }}"
SENTRY_PROJECT: "${{ steps.secrets.outputs.SENTRY_PROJECT }}"
UPDATES_SERVER_PRODUCT_NAME: "${{ secrets.UPDATES_SERVER_PRODUCT_NAME }}"
run: npm run build -- --mac
- name: Build nightly (Windows)
if: ${{ runner.os == 'Windows' }}
env:
MIXPANEL_TOKEN: "${{ secrets.MIXPANEL_PROJECT_TOKEN }}"
MIXPANEL_STAGE: "int"
NIGHTLY: 1
SENTRY_AUTH_TOKEN: "${{ steps.secrets.outputs.SENTRY_AUTH_TOKEN }}"
SENTRY_DSN: "${{ steps.secrets.outputs.SENTRY_DSN }}"
SENTRY_ORG: "${{ steps.secrets.outputs.SENTRY_ORG }}"
SENTRY_PROJECT: "${{ steps.secrets.outputs.SENTRY_PROJECT }}"
UPDATES_SERVER_PRODUCT_NAME: "${{ secrets.UPDATES_SERVER_PRODUCT_NAME }}"
run: npm run build -- --win
- name: Upload artifact to Camunda Download Center
uses: camunda/infra-global-github-actions/download-center-upload@2479efb5ed48b2ec0b9cb6db10898fd55c1e9bc5
with:
gcp_credentials: ${{ steps.secrets.outputs.GCP_CREDENTIALS_NAME }}
env: 'prod'
artifact_subpath: 'nightly'
artifact_file: "${{ join(matrix.files, ' ') }}"
post_failure:
name: Notify failure
needs: build_nightly
if: failure()
runs-on: ubuntu-latest
steps:
- name: Import Secrets
id: secrets
uses: hashicorp/[email protected]
with:
url: ${{ secrets.VAULT_ADDR }}
method: approle
roleId: ${{ secrets.VAULT_ROLE_ID }}
secretId: ${{ secrets.VAULT_SECRET_ID }}
exportEnv: false
secrets: |
secret/data/products/desktop-modeler/ci/slack_integration SLACK_CHANNEL_ID;
secret/data/products/desktop-modeler/ci/slack_integration SLACK_BOT_TOKEN;
- name: Post to a Slack channel
uses: slackapi/slack-github-action@v2
with:
method: chat.postMessage
token: ${{ steps.secrets.outputs.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ steps.secrets.outputs.SLACK_CHANNEL_ID }}
text: "Nightly build failed. <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|Go to the build.>"