-
Notifications
You must be signed in to change notification settings - Fork 2
106 lines (91 loc) · 2.76 KB
/
stable-macos.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
name: stable-macos
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: osx
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/MrCode-versions
VSCODE_QUALITY: stable
jobs:
build:
runs-on: ${{ matrix.runner }}
env:
VSCODE_ARCH: ${{ matrix.vscode_arch }}
strategy:
fail-fast: false
matrix:
include:
- runner: macos-12
vscode_arch: x64
- runner: [self-hosted, macOS, ARM64]
vscode_arch: arm64
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Yarn
run: npm install -g yarn
- name: Clone VSCodium repo
env:
VSCODIUM_LATEST: ${{ github.event.inputs.vscodium_latest }}
run: . get_repo.sh
- name: Prepare VSCodium
run: . prepare.sh
- name: Check existing MrCode tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_RELEASE: ${{ github.event.inputs.new_release }}
working-directory: ./vscodium
run: . check_tags.sh
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ./vscodium
run: ./build.sh
if: env.SHOULD_BUILD == 'yes'
- name: Prepare assets
env:
CERTIFICATE_OSX_P12: ${{ secrets.MACOS_P12_BASE64 }}
CERTIFICATE_OSX_PASSWORD: ${{ secrets.MACOS_P12_PASSWORD }}
CERTIFICATE_OSX_ID: ${{ secrets.MACOS_IDENTITY }}
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
if: env.SHOULD_BUILD == 'yes' || github.event.inputs.force_version
- name: Clean up keychain
if: always()
run: |
KEYCHAIN=$RUNNER_TEMP/build.keychain
if [ -f "$KEYCHAIN" ];
then
security delete-keychain $KEYCHAIN
fi