Skip to content

Commit ccbe191

Browse files
committed
change build
1 parent a6d5a5f commit ccbe191

File tree

12 files changed

+2629
-412
lines changed

12 files changed

+2629
-412
lines changed

.github/workflows/b2.yml

Lines changed: 0 additions & 412 deletions
This file was deleted.

.github/workflows/insider-linux.yml

Lines changed: 543 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: insider-macos
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
force_version:
7+
type: boolean
8+
description: Force update version
9+
generate_assets:
10+
type: boolean
11+
description: Generate assets
12+
checkout_pr:
13+
type: string
14+
description: Checkout PR
15+
repository_dispatch:
16+
types: [insider]
17+
push:
18+
branches: [ insider ]
19+
paths-ignore:
20+
- '**/*.md'
21+
- 'upstream/*.json'
22+
pull_request:
23+
branches: [ insider ]
24+
paths-ignore:
25+
- '**/*.md'
26+
27+
env:
28+
APP_NAME: VSCodium
29+
ASSETS_REPOSITORY: ${{ github.repository }}-insiders
30+
BINARY_NAME: codium-insiders
31+
GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'insider' }}
32+
GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }}
33+
ORG_NAME: ${{ github.repository_owner }}
34+
OS_NAME: osx
35+
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
36+
VSCODE_QUALITY: insider
37+
38+
jobs:
39+
build:
40+
runs-on: ${{ matrix.runner }}
41+
env:
42+
VSCODE_ARCH: ${{ matrix.vscode_arch }}
43+
strategy:
44+
fail-fast: false
45+
matrix:
46+
include:
47+
- runner: macos-13
48+
vscode_arch: x64
49+
- runner: [self-hosted, macOS, ARM64]
50+
vscode_arch: arm64
51+
52+
steps:
53+
- uses: actions/checkout@v4
54+
with:
55+
ref: ${{ env.GITHUB_BRANCH }}
56+
57+
- name: Switch to relevant branch
58+
env:
59+
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
60+
run: . get_pr.sh
61+
62+
- name: Setup Node.js environment
63+
uses: actions/setup-node@v4
64+
with:
65+
node-version: '20.18.2'
66+
67+
- name: Setup Python 3
68+
uses: actions/setup-python@v5
69+
with:
70+
python-version: '3.11'
71+
if: env.VSCODE_ARCH == 'x64'
72+
73+
- name: Clone VSCode repo
74+
run: . get_repo.sh
75+
76+
- name: Check PR or cron
77+
env:
78+
GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }}
79+
run: . check_cron_or_pr.sh
80+
81+
- name: Check existing VSCodium tags/releases
82+
env:
83+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
84+
run: . check_tags.sh
85+
if: env.SHOULD_DEPLOY == 'yes'
86+
87+
- name: Build
88+
env:
89+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90+
run: ./build.sh
91+
if: env.SHOULD_BUILD == 'yes'
92+
93+
- name: Prepare assets
94+
env:
95+
CERTIFICATE_OSX_APP_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_APP_PASSWORD }}
96+
CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_NEW_ID }}
97+
CERTIFICATE_OSX_P12_DATA: ${{ secrets.CERTIFICATE_OSX_NEW_P12_DATA }}
98+
CERTIFICATE_OSX_P12_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_P12_PASSWORD }}
99+
CERTIFICATE_OSX_TEAM_ID: ${{ secrets.CERTIFICATE_OSX_NEW_TEAM_ID }}
100+
run: ./prepare_assets.sh
101+
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true')
102+
103+
- name: Release
104+
env:
105+
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
106+
GITHUB_USERNAME: ${{ github.repository_owner }}
107+
run: ./release.sh
108+
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
109+
110+
- name: Update versions repo
111+
env:
112+
FORCE_UPDATE: ${{ github.event.inputs.force_version }}
113+
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
114+
GITHUB_USERNAME: ${{ github.repository_owner }}
115+
run: ./update_version.sh
116+
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
117+
118+
- name: Upload assets
119+
uses: actions/upload-artifact@v4
120+
with:
121+
name: bin-${{ matrix.vscode_arch }}
122+
path: assets/
123+
retention-days: 3
124+
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true'
125+
126+
- name: Clean up keychain
127+
if: always()
128+
run: |
129+
KEYCHAIN=$RUNNER_TEMP/build.keychain
130+
131+
if [ -f "$KEYCHAIN" ];
132+
then
133+
security delete-keychain $KEYCHAIN
134+
fi
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: insider-spearhead
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
new_release:
7+
type: boolean
8+
description: Force new Release
9+
force_dispatch:
10+
type: boolean
11+
description: Force dispatch
12+
dont_update:
13+
type: boolean
14+
description: Don't update VSCode
15+
dont_dispatch:
16+
type: boolean
17+
description: Disable dispatch
18+
schedule:
19+
- cron: '0 7 * * *'
20+
21+
jobs:
22+
build:
23+
runs-on: macos-14
24+
env:
25+
APP_NAME: VSCodium
26+
ASSETS_REPOSITORY: ${{ github.repository }}-insiders
27+
BINARY_NAME: codium-insiders
28+
GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }}
29+
ORG_NAME: ${{ github.repository_owner }}
30+
OS_NAME: osx
31+
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
32+
VSCODE_ARCH: arm64
33+
VSCODE_LATEST: ${{ github.event.inputs.dont_update == 'true' && 'no' || 'yes' }}
34+
VSCODE_QUALITY: insider
35+
36+
steps:
37+
- uses: actions/checkout@v4
38+
with:
39+
ref: insider
40+
41+
- name: Setup Node.js environment
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: '20.18.2'
45+
46+
- name: Clone VSCode repo
47+
run: . get_repo.sh
48+
49+
- name: Check existing VSCodium tags/releases
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
NEW_RELEASE: ${{ github.event.inputs.new_release }}
53+
IS_SPEARHEAD: 'yes'
54+
run: . check_tags.sh
55+
56+
- name: Build
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
run: ./build.sh
60+
if: env.SHOULD_BUILD == 'yes'
61+
62+
- name: Import GPG key
63+
uses: crazy-max/ghaction-import-gpg@v6
64+
with:
65+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
66+
passphrase: ${{ secrets.GPG_PASSPHRASE }}
67+
git_user_signingkey: true
68+
git_commit_gpgsign: true
69+
if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true'
70+
71+
- name: Update upstream version
72+
run: ./update_upstream.sh
73+
if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true'
74+
75+
- name: Prepare source
76+
run: ./prepare_src.sh
77+
if: env.SHOULD_BUILD == 'yes'
78+
79+
- name: Release source
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
82+
GITHUB_USERNAME: ${{ github.repository_owner }}
83+
run: ./release.sh
84+
if: env.SHOULD_BUILD == 'yes'
85+
86+
- name: Dispatch builds
87+
uses: peter-evans/repository-dispatch@v3
88+
with:
89+
event-type: 'insider'
90+
if: github.event.inputs.dont_dispatch != 'true' && (env.SHOULD_BUILD == 'yes' || github.event.inputs.force_dispatch == 'true')

0 commit comments

Comments
 (0)