-
-
Notifications
You must be signed in to change notification settings - Fork 2
138 lines (126 loc) · 5.38 KB
/
arm64-staging-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
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
132
133
134
135
136
137
138
name: StagingPublish
on:
# push:
# branches:
# - main
workflow_dispatch:
jobs:
publish:
# all published versions are considered "staging" until we release a non-alpha version
environment: staging
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- name: Install packages for building
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get install --no-install-recommends rpm libarchive-tools
else
exit 0
fi
- 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: Build and publish releases
env:
# These values are used for auto updates signing
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 }}
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
GH_TOKEN: ${{ secrets.GH_TOKEN }}
# This is used for publishing snap release assets to snapcraft
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
uses: pguyot/arm-runner-action@v2
id: build_image
with:
base_image: raspi_4_bullseye:20230102
commands: |
sudo apt-get install --no-install-recommends rpm libarchive-tools
npm install
npm run postinstall
npm run build
npm exec electron-builder -- --publish always --linux
# - name: Publish releases
# env:
# # These values are used for auto updates signing
# 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 }}
# 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
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
# # This is used for publishing snap release assets to snapcraft
# SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
# run: |
# npm run postinstall
# npm run build
# if [ "$RUNNER_OS" == "macOS" ]; then
# npm exec electron-builder -- --publish always --win --mac
# else
# npm exec electron-builder -- --publish always --linux
# fi
# - name: Publish arm64 releases
# env:
# # These values are used for auto updates signing
# 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 }}
# 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
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
# # This is used for publishing snap release assets to snapcraft
# SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_STORE_CREDENTIALS }}
# uses: pguyot/arm-runner-action@v2
# with:
# base_image: raspi_4_bullseye:20230102
# commands: |
# npm install
# npm run postinstall
# npm run build
# if [ "$RUNNER_OS" == "Linux" ]; then
# npm exec electron-builder -- --publish always --linux
# else
# exit 0
# fi