-
Notifications
You must be signed in to change notification settings - Fork 2
218 lines (191 loc) · 6.19 KB
/
stable-linux.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
name: stable-linux
on:
workflow_dispatch:
inputs:
new_release:
type: boolean
description: Force new Release
force_version:
type: boolean
description: Force update version
vscodium_latest:
type: boolean
description: Use latest VSCodium
push:
tags:
- "*"
env:
APP_NAME: MrCode
ASSETS_REPOSITORY: ${{ github.repository }}
OS_NAME: linux
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/MrCode-versions
VSCODE_QUALITY: stable
jobs:
check:
runs-on: ubuntu-latest
container:
image: vscodium/vscodium-linux-build-agent:bionic-x64
outputs:
MS_TAG: ${{ env.MS_TAG }}
MS_COMMIT: ${{ env.MS_COMMIT }}
VSCODIUM_COMMIT: ${{ env.VSCODIUM_COMMIT }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Clone VSCodium repo
env:
VSCODIUM_LATEST: ${{ github.event.inputs.vscodium_latest }}
run: ./get_repo.sh
- name: Clone VSCode repo
working-directory: ./vscodium
run: ./get_repo.sh
dependencies:
needs:
- check
runs-on: ubuntu-latest
env:
MS_TAG: ${{ needs.check.outputs.MS_TAG }}
MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }}
VSCODIUM_COMMIT: ${{ needs.check.outputs.VSCODIUM_COMMIT }}
RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }}
strategy:
fail-fast: false
matrix:
include:
- vscode_arch: x64
image: vscodium/vscodium-linux-build-agent:centos7-devtoolset8-x64
# - vscode_arch: arm64
# image: vscodium/vscodium-linux-build-agent:bionic-x64
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Clone VSCodium repo
run: ./get_repo.sh
- name: Clone VSCode repo
working-directory: ./vscodium
run: ./get_repo.sh
- uses: docker/setup-qemu-action@v2
if: matrix.vscode_arch == 'arm64'
- name: Install remote dependencies (x64)
env:
npm_config_arch: x64
working-directory: ./vscodium
run: ./install_remote_dependencies.sh
if: matrix.vscode_arch == 'x64'
# - name: Install remote dependencies (arm64)
# run: |
# set -e
# docker run -e VSCODE_QUALITY -e GITHUB_TOKEN -v $(pwd):/root/vscodium vscodium/vscodium-linux-build-agent:centos7-devtoolset8-arm64 /root/vscodium/install_remote_dependencies.sh
# if: matrix.vscode_arch == 'arm64'
- name: Save remote dependencies
uses: actions/upload-artifact@v3
with:
name: remote-dependencies-${{ matrix.vscode_arch }}
path: ./vscodium/remote-dependencies.tar
retention-days: 30
build:
needs:
- check
- dependencies
runs-on: ubuntu-latest
env:
DISABLE_UPDATE: 'yes'
MS_TAG: ${{ needs.check.outputs.MS_TAG }}
MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }}
VSCODIUM_COMMIT: ${{ needs.check.outputs.VSCODIUM_COMMIT }}
RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }}
strategy:
fail-fast: false
matrix:
include:
- vscode_arch: x64
npm_arch: x64
image: vscodium/vscodium-linux-build-agent:bionic-x64
- vscode_arch: arm64
npm_arch: arm64
image: vscodium/vscodium-linux-build-agent:buster-arm64
- vscode_arch: armhf
npm_arch: arm
image: vscodium/vscodium-linux-build-agent:buster-armhf
- vscode_arch: ppc64le
npm_arch: ppcc64le
image: vscodium/vscodium-linux-build-agent:bionic-ppc64le
container:
image: ${{ matrix.image }}
env:
VSCODE_ARCH: ${{ matrix.vscode_arch }}
outputs:
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
SHOULD_BUILD: ${{ env.SHOULD_BUILD }}
steps:
- uses: actions/checkout@v3
- name: Clone VSCodium repo
run: ./get_repo.sh
- name: Prepare VSCodium
run: ./prepare.sh
- name: Install GH
run: ./install_gh.sh
- name: Check existing VSCodium tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_RELEASE: ${{ github.event.inputs.new_release }}
working-directory: ./vscodium
run: ./check_tags.sh
- name: Restore remote dependencies
uses: actions/download-artifact@v3
with:
name: remote-dependencies-${{ matrix.vscode_arch }}
path: ./vscodium
if: env.SHOULD_BUILD == 'yes' && matrix.vscode_arch == 'x64'
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_arch }}
working-directory: ./vscodium
run: ./build.sh
if: env.SHOULD_BUILD == 'yes'
- name: Prepare assets
working-directory: ./vscodium
run: ./prepare_assets.sh
if: env.SHOULD_BUILD == 'yes'
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ./vscodium
run: ./release.sh
if: env.SHOULD_BUILD == 'yes'
- name: Update versions repo
env:
FORCE_UPDATE: ${{ github.event.inputs.force_version }}
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
working-directory: ./vscodium
run: ./update_version.sh
aur:
needs:
- build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- package_name: mrcode-bin
package_type: stable
- package_name: mrcode
package_type: stable
- package_name: mrcode-git
package_type: rolling
steps:
- name: Publish ${{ matrix.package_name }}
uses: zokugun/github-actions-aur-releaser@v1
with:
package_name: ${{ matrix.package_name }}
package_type: ${{ matrix.package_type }}
aur_private_key: ${{ secrets.AUR_PRIVATE_KEY }}
aur_username: ${{ secrets.AUR_USERNAME }}
aur_email: ${{ secrets.AUR_EMAIL }}