-
-
Notifications
You must be signed in to change notification settings - Fork 30
80 lines (65 loc) · 2.48 KB
/
prod-publish.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
name: ProductionPublish
on:
push:
branches:
- release/*
workflow_dispatch:
jobs:
publish:
# all published versions are considered "staging" until we release a non-alpha version
environment: prod
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- if: matrix.os == 'ubuntu-latest'
name: Install packages for building
run: |
sudo apt-get install --no-install-recommends -y rpm libarchive-tools
# https://github.com/electron/forge/issues/2807
- if: ${{ matrix.os == 'macos-latest' }}
run: python3 -m pip install setuptools --break-system-packages
- name: Used variables
run: |
echo "MP_PROJECT_ENV variable : ${{ vars.MP_PROJECT_ENV }}"
echo "NICENODE_ENV variable : ${{ vars.NICENODE_ENV }}"
- name: Checkout git repo
uses: actions/checkout@v4
- name: Install Node and NPM
uses: actions/setup-node@v4
with:
node-version: 20
# cache: npm
- name: Install dependencies
run: |
npm ci
- if: ${{ matrix.os == 'macos-latest' }}
name: Import Certs
uses: apple-actions/import-codesign-certs@v3
with:
p12-file-base64: ${{ secrets.CSC_LINK }}
p12-password: ${{ secrets.CSC_KEY_PASSWORD }}
- name: Publish releases
env:
# macOS code signing and notarization
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_PROD_CERT_NAME: ${{ secrets.APPLE_PROD_CERT_NAME }}
CSC_LINK: ${{ secrets.CSC_LINK }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }}
WIN_CSC_LINK: ${{ secrets.WIN_CSC_BASE64 }}
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD_2 }}
# CSC_IDENTITY_AUTO_DISCOVERY: false
# This is used for app event tracking
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
MP_PROJECT_TOKEN: ${{ secrets.MP_PROJECT_TOKEN }}
MP_PROJECT_ENV: ${{ vars.MP_PROJECT_ENV }}
NICENODE_ENV: ${{ vars.NICENODE_ENV }}
# This is used for uploading release assets to github
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
npm run publish -- --arch=x64
npm run publish -- --arch=arm64