From 04e8a204a3d7606a4bfb7ed7ab3a9723ea439f9d Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sat, 22 Mar 2025 18:14:55 -0700 Subject: [PATCH 01/54] add trusted domain --- product.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/product.json b/product.json index 00cc284c..e82926c9 100644 --- a/product.json +++ b/product.json @@ -35,5 +35,9 @@ "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery", "itemUrl": "https://marketplace.visualstudio.com/items" }, - "builtInExtensions": [] + "builtInExtensions": [], + "linkProtectionTrustedDomains": [ + "https://voideditor.com", + "https://voideditor.dev" + ] } From 82851d519d6fe20f2ca731c43b00cc322b43cf8b Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 00:31:38 -0700 Subject: [PATCH 02/54] slice --- src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts b/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts index 287299ff..a1175ae3 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupWatermark.ts @@ -250,7 +250,9 @@ export class EditorGroupWatermark extends Disposable { linkSpan.appendChild(dirSpan); return linkSpan - }).filter(v => !!v) + }) + .filter(v => !!v) + .slice(0, 5) // take 5 most recent ) } From 35f53e66dd5d1f3d4c4b547475e03de38d4c56fb Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Sun, 23 Mar 2025 18:47:34 -0700 Subject: [PATCH 03/54] definition --- .../browser/react/src/void-command-bar-tsx/VoidCommandBar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/void-command-bar-tsx/VoidCommandBar.tsx b/src/vs/workbench/contrib/void/browser/react/src/void-command-bar-tsx/VoidCommandBar.tsx index 25ffbaec..99dbf770 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/void-command-bar-tsx/VoidCommandBar.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/void-command-bar-tsx/VoidCommandBar.tsx @@ -97,7 +97,7 @@ const VoidCommandBar = ({ uri, editor }: VoidCommandBarProps) => { if (diffid === undefined) return const diff = editCodeService.diffOfId[diffid] if (!diff) return - editor.revealLineNearTop(diff.startLine, ScrollType.Immediate) + editor.revealLineNearTop(diff.startLine - 1, ScrollType.Immediate) commandBarService.setDiffIdx(uri, idx) } const getNextUriIdx = (step: 1 | -1) => { From 633f7ffee5891b98a8d4d949b7b58aa03646115c Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 19:30:22 -0700 Subject: [PATCH 04/54] test new workflow --- .github/workflows/distro-build.yml | 209 +++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 .github/workflows/distro-build.yml diff --git a/.github/workflows/distro-build.yml b/.github/workflows/distro-build.yml new file mode 100644 index 00000000..b9a44e54 --- /dev/null +++ b/.github/workflows/distro-build.yml @@ -0,0 +1,209 @@ +name: Build Void + +on: + push: + branches: [ main, release/* ] + workflow_dispatch: + +jobs: + build-linux: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev + npm ci + + - name: Build + run: | + npm run gulp vscode-linux-x64-min + + - name: Package + run: | + mkdir -p .build/linux/client + ARCHIVE_PATH=".build/linux/client/void-linux-x64.tar.gz" + tar -czf $ARCHIVE_PATH -C .. VSCode-linux-x64 + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: void-linux-x64 + path: .build/linux/client/void-linux-x64.tar.gz + + build-windows: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run gulp vscode-win32-x64-min + + - name: Package + run: | + mkdir -p .build/win32-x64 + Compress-Archive -Path ..\VSCode-win32-x64\* -DestinationPath .build\win32-x64\void-win32-x64.zip + shell: pwsh + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: void-win32-x64 + path: .build/win32-x64/void-win32-x64.zip + + build-macos: + runs-on: macos-latest + strategy: + matrix: + arch: [arm64, x64] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Install dependencies + run: | + npm ci + npm install -g create-dmg + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-darwin-${{ matrix.arch }}-min + + - name: Create temporary working directory + run: | + WORKING_DIR="${{ runner.temp }}/VoidSign-${{ matrix.arch }}" + KEYCHAIN_DIR="${WORKING_DIR}/1_Keychain" + SIGN_DIR="${WORKING_DIR}/2_Signed" + mkdir -p "${WORKING_DIR}" "${KEYCHAIN_DIR}" "${SIGN_DIR}" + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + echo "WORKING_DIR=${WORKING_DIR}" >> $GITHUB_ENV + echo "KEYCHAIN_DIR=${KEYCHAIN_DIR}" >> $GITHUB_ENV + echo "SIGN_DIR=${SIGN_DIR}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP_DIR=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV + + - name: Import certificate + env: + P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} + P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} + KEYCHAIN_PASSWORD: "temporary-password" + run: | + KEYCHAIN="${KEYCHAIN_DIR}/buildagent.keychain" + echo "KEYCHAIN=${KEYCHAIN}" >> $GITHUB_ENV + + # Create a new keychain + security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" + security set-keychain-settings -lut 21600 "${KEYCHAIN}" + security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" + + # Import certificate + echo "${P12_BASE64}" | base64 --decode > "${KEYCHAIN_DIR}/certificate.p12" + security import "${KEYCHAIN_DIR}/certificate.p12" -k "${KEYCHAIN}" -P "${P12_PASSWORD}" -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" > /dev/null + + # Add to keychain list + security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) + + - name: Sign Application + env: + CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} + VSCODE_ARCH: ${{ matrix.arch }} + run: | + export AGENT_TEMPDIRECTORY="${KEYCHAIN_DIR}" + cd $(pwd)/build/darwin + node sign.js "${SIGN_DIR}" + codesign --verify --verbose=4 "${SIGNED_DOTAPP}" + + - name: Create DMG + run: | + cd "${SIGNED_DOTAPP_DIR}" + npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . + GENERATED_DMG=$(ls *.dmg) + mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" + codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" + echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV + + - name: Notarize + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + APP_PASSWORD: ${{ secrets.APPLE_APP_PWD }} + KEYCHAIN_PASSWORD: "temporary-password" + run: | + # Store credentials for notarization + xcrun notarytool store-credentials "Void" \ + --apple-id "${APPLE_ID}" \ + --team-id "${TEAM_ID}" \ + --password "${APP_PASSWORD}" \ + --keychain "${KEYCHAIN}" + + # Submit for notarization with a timeout + xcrun notarytool submit "${SIGNED_DMG}" \ + --keychain-profile "Void" \ + --keychain "${KEYCHAIN}" \ + --wait --timeout 2h + + # Staple the notarization ticket + xcrun stapler staple "${SIGNED_DMG}" + + - name: Create Raw App Archive + run: | + cd "${SIGNED_DOTAPP_DIR}" + VOIDAPP=$(basename "${SIGNED_DOTAPP}") + ditto -c -k --sequesterRsrc --keepParent "${VOIDAPP}" "Void-RawApp-darwin-${{ matrix.arch }}.zip" + + - name: Generate Hash File + run: | + cd "${SIGNED_DOTAPP_DIR}" + SHA1=$(shasum -a 1 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) + SHA256=$(shasum -a 256 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) + TIMESTAMP=$(date +%s) + + cat > "Void-UpdJSON-darwin-${{ matrix.arch }}.json" << EOF + { + "sha256hash": "${SHA256}", + "hash": "${SHA1}", + "timestamp": ${TIMESTAMP} + } + EOF + + - name: Upload DMG + uses: actions/upload-artifact@v3 + with: + name: void-darwin-${{ matrix.arch }}-dmg + path: ${{ env.SIGNED_DMG }} + + - name: Upload Raw App + uses: actions/upload-artifact@v3 + with: + name: void-darwin-${{ matrix.arch }}-rawapp + path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-RawApp-darwin-${{ matrix.arch }}.zip + + - name: Upload Hash File + uses: actions/upload-artifact@v3 + with: + name: void-darwin-${{ matrix.arch }}-hash + path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json From 71f8315e06730d3af9efc4bf1e57cc1d78c1ba84 Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Sun, 23 Mar 2025 19:30:32 -0700 Subject: [PATCH 05/54] fix paste issue --- .../void/browser/react/src/util/inputs.tsx | 31 ++++++++++++++ .../react/src/void-settings-tsx/Settings.tsx | 41 ++++++------------- 2 files changed, 44 insertions(+), 28 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx index ec2b2e94..a1c573ac 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx @@ -152,6 +152,37 @@ export const VoidInputBox2 = forwardRef(fun }) + +export const VoidSimpleInputBox = ({ value, onChangeValue, placeholder, className, disabled, ...inputProps }: { + value: string; + onChangeValue: (value: string) => void; + placeholder: string; + className?: string; + disabled?: boolean; +} & React.InputHTMLAttributes) => { + const inputRef = useRef(null); + + return ( + onChangeValue(e.target.value)} + placeholder={placeholder} + disabled={disabled} + className={`w-full resize-none text-void-fg-1 placeholder:text-void-fg-3 px-2 py-1 rounded-sm + ${disabled ? 'opacity-50 cursor-not-allowed' : ''} + ${className}`} + style={{ + background: asCssVariable(inputBackground), + color: asCssVariable(inputForeground) + }} + {...inputProps} + /> + ); +}; + + export const VoidInputBox = ({ onChangeText, onCreateInstance, inputBoxRef, placeholder, isPasswordField, multiline }: { onChangeText: (value: string) => void; styles?: Partial, diff --git a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx index 375e5086..3c6d2245 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx @@ -7,7 +7,7 @@ import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react' import { InputBox } from '../../../../../../../base/browser/ui/inputbox/inputBox.js' import { ProviderName, SettingName, displayInfoOfSettingName, providerNames, VoidModelInfo, globalSettingNames, customSettingNamesOfProvider, RefreshableProviderName, refreshableProviderNames, displayInfoOfProviderName, defaultProviderSettings, nonlocalProviderNames, localProviderNames, GlobalSettingName, featureNames, displayInfoOfFeatureName, isProviderNameDisabled, FeatureName } from '../../../../common/voidSettingsTypes.js' import ErrorBoundary from '../sidebar-tsx/ErrorBoundary.js' -import { VoidButton, VoidCheckBox, VoidCustomDropdownBox, VoidInputBox, VoidInputBox2, VoidSwitch } from '../util/inputs.js' +import { VoidButton, VoidCheckBox, VoidCustomDropdownBox, VoidInputBox, VoidInputBox2, VoidSimpleInputBox, VoidSwitch } from '../util/inputs.js' import { useAccessor, useIsDark, useRefreshModelListener, useRefreshModelState, useSettingsState } from '../util/services.js' import { X, RefreshCw, Loader2, Check, MoveRight } from 'lucide-react' import { useScrollbarStyles } from '../util/useScrollbarStyles.js' @@ -255,45 +255,30 @@ export const ModelDump = () => { const ProviderSetting = ({ providerName, settingName }: { providerName: ProviderName, settingName: SettingName }) => { - - // const { title: providerTitle, } = displayInfoOfProviderName(providerName) - const { title: settingTitle, placeholder, isPasswordField, subTextMd } = displayInfoOfSettingName(providerName, settingName) const accessor = useAccessor() const voidSettingsService = accessor.get('IVoidSettingsService') + const settingsState = useSettingsState() - let weChangedTextRef = false + const settingValue = settingsState.settingsOfProvider[providerName][settingName] as string // this should always be a string in this component + if (typeof settingValue !== 'string') { + console.log('Error: Provider setting had a non-string value.') + return + } return
- { - if (weChangedTextRef) return + { voidSettingsService.setSettingOfProvider(providerName, settingName, newVal) }, [voidSettingsService, providerName, settingName])} - // we are responsible for setting the initial value. always sync the instance whenever there's a change to state. - onCreateInstance={useCallback((instance: InputBox) => { - const syncInstance = () => { - const settingsAtProvider = voidSettingsService.state.settingsOfProvider[providerName]; - const stateVal = settingsAtProvider[settingName as SettingName] + // placeholder={`${providerTitle} ${settingTitle} (${placeholder})`} + placeholder={`${settingTitle} (${placeholder})`} - // console.log('SYNCING TO', providerName, settingName, stateVal) - weChangedTextRef = true - instance.value = stateVal as string - weChangedTextRef = false - } - - syncInstance() - const disposable = voidSettingsService.onDidChangeState(syncInstance) - return [disposable] - }, [voidSettingsService, providerName, settingName])} - multiline={false} - isPasswordField={isPasswordField} + type={isPasswordField ? 'password' : 'text'} /> {subTextMd === undefined ? null :
From fd1c8406182cc2be004dfa329dd73e9f105d37ab Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Sun, 23 Mar 2025 19:35:26 -0700 Subject: [PATCH 06/54] fix ugly blue color --- .../contrib/void/browser/react/src/util/inputs.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx index a1c573ac..11819ce0 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx @@ -350,7 +350,7 @@ export const VoidSlider = ({ size === 'xs' ? 'h-1' : size === 'sm' ? 'h-1.5' : size === 'sm+' ? 'h-2' : 'h-2.5' - } bg-gray-200 dark:bg-gray-700 rounded-full cursor-pointer`} + } bg-zinc-200 dark:bg-zinc-600 rounded-full cursor-pointer`} onClick={handleTrackClick} > {/* Filled part of track */} @@ -359,7 +359,7 @@ export const VoidSlider = ({ size === 'xs' ? 'h-1' : size === 'sm' ? 'h-1.5' : size === 'sm+' ? 'h-2' : 'h-2.5' - } bg-gray-900 dark:bg-white rounded-full`} + } bg-zinc-900 dark:bg-white rounded-full`} style={{ width: `${percentage}%` }} />
@@ -372,7 +372,7 @@ export const VoidSlider = ({ size === 'sm' ? 'h-3 w-3' : size === 'sm+' ? 'h-3.5 w-3.5' : 'h-4 w-4' } - bg-white dark:bg-gray-900 rounded-full shadow-md ${disabled ? 'cursor-not-allowed' : 'cursor-grab active:cursor-grabbing'}`} + bg-white dark:bg-zinc-900 rounded-full shadow-md ${disabled ? 'cursor-not-allowed' : 'cursor-grab active:cursor-grabbing'}`} style={{ left: `${percentage}%`, zIndex: 2 }} // Ensure thumb is above the invisible clickable area onMouseDown={(e) => { if (disabled) return; @@ -424,7 +424,7 @@ export const VoidSwitch = ({ className={` cursor-pointer relative inline-flex items-center rounded-full transition-colors duration-200 ease-in-out - ${value ? 'bg-gray-900 dark:bg-white' : 'bg-gray-200 dark:bg-gray-700'} + ${value ? 'bg-zinc-900 dark:bg-white' : 'bg-zinc-200 dark:bg-zinc-600'} ${disabled ? 'opacity-25' : ''} ${size === 'xxs' ? 'h-3 w-5' : ''} ${size === 'xs' ? 'h-4 w-7' : ''} @@ -435,7 +435,7 @@ export const VoidSwitch = ({ > void }) => { return } From 3ecdae6ab61fe4d1294d77c1a86be7925df9c706 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 19:43:39 -0700 Subject: [PATCH 07/54] rename --- .github/workflows/{distro-build.yml => build.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{distro-build.yml => build.yml} (100%) diff --git a/.github/workflows/distro-build.yml b/.github/workflows/build.yml similarity index 100% rename from .github/workflows/distro-build.yml rename to .github/workflows/build.yml From 2b33294a85527e6bfae6bc45081608b3b35f3320 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 19:44:54 -0700 Subject: [PATCH 08/54] + --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b9a44e54..18c2bb30 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build Void on: push: - branches: [ main, release/* ] + branches: [ main, release/*, github-workflow ] workflow_dispatch: jobs: From d6df2514e158c9124ca2fbea7161bb665c160b0c Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Sun, 23 Mar 2025 20:01:05 -0700 Subject: [PATCH 09/54] fix ugly colors --- .../contrib/void/browser/react/src/util/inputs.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx index 11819ce0..775087b0 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx @@ -350,7 +350,7 @@ export const VoidSlider = ({ size === 'xs' ? 'h-1' : size === 'sm' ? 'h-1.5' : size === 'sm+' ? 'h-2' : 'h-2.5' - } bg-zinc-200 dark:bg-zinc-600 rounded-full cursor-pointer`} + } bg-void-bg-2 rounded-full cursor-pointer`} onClick={handleTrackClick} > {/* Filled part of track */} @@ -359,12 +359,12 @@ export const VoidSlider = ({ size === 'xs' ? 'h-1' : size === 'sm' ? 'h-1.5' : size === 'sm+' ? 'h-2' : 'h-2.5' - } bg-zinc-900 dark:bg-white rounded-full`} + } bg-void-fg-1 rounded-full`} style={{ width: `${percentage}%` }} />
- {/* Thumb with sizes matching VoidSwitch */} + {/* Thumb */}
{ if (disabled) return; @@ -424,7 +425,7 @@ export const VoidSwitch = ({ className={` cursor-pointer relative inline-flex items-center rounded-full transition-colors duration-200 ease-in-out - ${value ? 'bg-zinc-900 dark:bg-white' : 'bg-zinc-200 dark:bg-zinc-600'} + ${value ? 'bg-zinc-900 dark:bg-white' : 'bg-white dark:bg-zinc-600'} ${disabled ? 'opacity-25' : ''} ${size === 'xxs' ? 'h-3 w-5' : ''} ${size === 'xs' ? 'h-4 w-7' : ''} @@ -955,7 +956,7 @@ export const BlockCode = ({ initValue, language, maxHeight, showScrollbars }: Bl export const VoidButton = ({ children, disabled, onClick }: { children: React.ReactNode; disabled?: boolean; onClick: () => void }) => { return } From 16c7aaf599acd35632c6b1bfbf2b9dd98163ab01 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 20:04:35 -0700 Subject: [PATCH 10/54] v4? --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18c2bb30..3941c4f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: tar -czf $ARCHIVE_PATH -C .. VSCode-linux-x64 - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: void-linux-x64 path: .build/linux/client/void-linux-x64.tar.gz @@ -63,7 +63,7 @@ jobs: shell: pwsh - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: void-win32-x64 path: .build/win32-x64/void-win32-x64.zip @@ -191,19 +191,19 @@ jobs: EOF - name: Upload DMG - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: void-darwin-${{ matrix.arch }}-dmg path: ${{ env.SIGNED_DMG }} - name: Upload Raw App - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: void-darwin-${{ matrix.arch }}-rawapp path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-RawApp-darwin-${{ matrix.arch }}.zip - name: Upload Hash File - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: void-darwin-${{ matrix.arch }}-hash path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json From 853a26ae8ec0670025b7cb9ab174bb4b291f1cc9 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 20:08:34 -0700 Subject: [PATCH 11/54] disable ci --- .github/workflows/build.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3941c4f1..5bf8a959 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: run: | sudo apt-get update sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev - npm ci + # npm ci # disabled for now - name: Build run: | @@ -51,7 +51,8 @@ jobs: node-version-file: '.nvmrc' - name: Install dependencies - run: npm ci + run: | + # npm ci # disabled for now - name: Build run: npm run gulp vscode-win32-x64-min @@ -84,7 +85,7 @@ jobs: - name: Install dependencies run: | - npm ci + # npm ci # disabled for now npm install -g create-dmg - name: Build From 31163e85160cf30f622025fc3b3bdd3066aea053 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 20:20:41 -0700 Subject: [PATCH 12/54] npm i --- .github/workflows/build.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5bf8a959..b48c1875 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,10 +21,13 @@ jobs: run: | sudo apt-get update sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev - # npm ci # disabled for now + npm install + npm install -g node-gyp + npm install -g gulp-cli - name: Build run: | + npm run buildreact npm run gulp vscode-linux-x64-min - name: Package @@ -52,10 +55,14 @@ jobs: - name: Install dependencies run: | - # npm ci # disabled for now + npm install + npm install -g node-gyp + npm install -g gulp-cli - name: Build - run: npm run gulp vscode-win32-x64-min + run: | + npm run buildreact + npm run gulp vscode-win32-x64-min - name: Package run: | @@ -85,7 +92,9 @@ jobs: - name: Install dependencies run: | - # npm ci # disabled for now + npm install + npm install -g node-gyp + npm install -g gulp-cli npm install -g create-dmg - name: Build From 1c7494861d14bef427557b10817e21fc04391037 Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Sun, 23 Mar 2025 20:26:47 -0700 Subject: [PATCH 13/54] rename for better accuracy --- src/vs/workbench/contrib/void/browser/aiRegexService.ts | 4 ++-- .../workbench/contrib/void/browser/chatThreadService.ts | 8 ++++---- .../void/browser/react/src/sidebar-tsx/SidebarChat.tsx | 8 ++++---- src/vs/workbench/contrib/void/browser/toolsService.ts | 6 +++--- src/vs/workbench/contrib/void/common/prompt/prompts.ts | 4 ++-- src/vs/workbench/contrib/void/common/toolsServiceTypes.ts | 4 ++-- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/aiRegexService.ts b/src/vs/workbench/contrib/void/browser/aiRegexService.ts index 6495a310..f8b15e56 100644 --- a/src/vs/workbench/contrib/void/browser/aiRegexService.ts +++ b/src/vs/workbench/contrib/void/browser/aiRegexService.ts @@ -34,7 +34,7 @@ // // const result = await new Promise((res, rej) => { // // sendLLMMessage({ // // messages, -// // tools: ['text_search'], +// // tools: ['semantic_search'], // // onFinalMessage: ({ result: r, }) => { // // res(r) // // }, @@ -73,7 +73,7 @@ // // const result = new Promise((res, rej) => { // // sendLLMMessage({ // // messages, -// // tools: ['text_search'], +// // tools: ['semantic_search'], // // onResult: (r) => { // // res(r) // // } diff --git a/src/vs/workbench/contrib/void/browser/chatThreadService.ts b/src/vs/workbench/contrib/void/browser/chatThreadService.ts index e3024792..90299f02 100644 --- a/src/vs/workbench/contrib/void/browser/chatThreadService.ts +++ b/src/vs/workbench/contrib/void/browser/chatThreadService.ts @@ -392,7 +392,7 @@ class ChatThreadService extends Disposable implements IChatThreadService { { role: 'tool', - name: 'text_search', + name: 'semantic_search', id: 'tool-4', paramsStr: '{"query": "function main"}', content: 'Found matches in 3 files', @@ -408,15 +408,15 @@ class ChatThreadService extends Disposable implements IChatThreadService { hasNextPage: false } }, - } satisfies ToolMessage<'text_search'>, + } satisfies ToolMessage<'semantic_search'>, // { // role: 'tool_request', - // name: 'text_search', + // name: 'semantic_search', // params: { queryStr: 'function main', pageNumber: 0 }, // paramsStr: '{"query": "function main"}', // id: 'request-4', - // } satisfies ToolRequestApproval<'text_search'>, + // } satisfies ToolRequestApproval<'semantic_search'>, // --- diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index 77697ee8..b99dd266 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -1178,7 +1178,7 @@ const titleOfToolName = { 'read_file': { done: 'Read file', proposed: 'Read file', running: loadingTitleWrapper('Reading file') }, 'list_dir': { done: 'Inspected folder', proposed: 'Inspect folder', running: loadingTitleWrapper('Inspecting folder') }, 'pathname_search': { done: 'Searched by file name', proposed: 'Search by file name', running: loadingTitleWrapper('Searching by file name') }, - 'text_search': { done: 'Searched', proposed: 'Search text', running: loadingTitleWrapper('Searching') }, + 'semantic_search': { done: 'Semantic searched', proposed: 'Semantic search', running: loadingTitleWrapper('Searching') }, 'create_uri': { done: (isFolder: boolean) => `Created ${folderFileStr(isFolder)}`, proposed: (isFolder: boolean | null) => isFolder === null ? 'Create URI' : `Create ${folderFileStr(isFolder)}`, @@ -1210,8 +1210,8 @@ const toolNameToDesc = (toolName: ToolName, _toolParams: ToolCallParams[ToolName } else if (toolName === 'pathname_search') { const toolParams = _toolParams as ToolCallParams['pathname_search'] return `"${toolParams.queryStr}"`; - } else if (toolName === 'text_search') { - const toolParams = _toolParams as ToolCallParams['text_search'] + } else if (toolName === 'semantic_search') { + const toolParams = _toolParams as ToolCallParams['semantic_search'] return `"${toolParams.queryStr}"`; } else if (toolName === 'create_uri') { const toolParams = _toolParams as ToolCallParams['create_uri'] @@ -1490,7 +1490,7 @@ const toolNameToComponent: { [T in ToolName]: ToolComponent } = { return } }, - 'text_search': { + 'semantic_search': { requestWrapper: null, resultWrapper: ({ toolMessage }) => { const accessor = useAccessor() diff --git a/src/vs/workbench/contrib/void/browser/toolsService.ts b/src/vs/workbench/contrib/void/browser/toolsService.ts index 45048458..7c693d0c 100644 --- a/src/vs/workbench/contrib/void/browser/toolsService.ts +++ b/src/vs/workbench/contrib/void/browser/toolsService.ts @@ -227,7 +227,7 @@ export class ToolsService implements IToolsService { return { queryStr, pageNumber } }, - text_search: async (params: string) => { + semantic_search: async (params: string) => { const o = validateJSON(params) const { query: queryUnknown, pageNumber: pageNumberUnknown } = o @@ -314,7 +314,7 @@ export class ToolsService implements IToolsService { return { result: { uris, hasNextPage } } }, - text_search: async ({ queryStr, pageNumber }) => { + semantic_search: async ({ queryStr, pageNumber }) => { const query = queryBuilder.text({ pattern: queryStr, isRegExp: true, @@ -388,7 +388,7 @@ export class ToolsService implements IToolsService { pathname_search: (params, result) => { return result.uris.map(uri => uri.fsPath).join('\n') + nextPageStr(result.hasNextPage) }, - text_search: (params, result) => { + semantic_search: (params, result) => { return result.uris.map(uri => uri.fsPath).join('\n') + nextPageStr(result.hasNextPage) }, // --- diff --git a/src/vs/workbench/contrib/void/common/prompt/prompts.ts b/src/vs/workbench/contrib/void/common/prompt/prompts.ts index b6e27ce6..13ea2eb3 100644 --- a/src/vs/workbench/contrib/void/common/prompt/prompts.ts +++ b/src/vs/workbench/contrib/void/common/prompt/prompts.ts @@ -76,8 +76,8 @@ export const voidTools = { }, }, - text_search: { - name: 'text_search', + semantic_search: { + name: 'semantic_search', description: `Returns pathnames of files with an exact match of the query. The query can be any regex. This does NOT search pathname. As a follow-up, you may want to use read_file to view the full file contents of the results. ${paginationHelper.desc}`, params: { query: { type: 'string', description: undefined }, diff --git a/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts b/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts index adefa286..e7315718 100644 --- a/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts +++ b/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts @@ -44,7 +44,7 @@ export type ToolCallParams = { 'read_file': { uri: URI, pageNumber: number }, 'list_dir': { rootURI: URI, pageNumber: number }, 'pathname_search': { queryStr: string, pageNumber: number }, - 'text_search': { queryStr: string, pageNumber: number }, + 'semantic_search': { queryStr: string, pageNumber: number }, // --- 'edit': { uri: URI, changeDescription: string }, 'create_uri': { uri: URI, isFolder: boolean }, @@ -57,7 +57,7 @@ export type ToolResultType = { 'read_file': { fileContents: string, hasNextPage: boolean }, 'list_dir': { children: ToolDirectoryItem[] | null, hasNextPage: boolean, hasPrevPage: boolean, itemsRemaining: number }, 'pathname_search': { uris: URI[], hasNextPage: boolean }, - 'text_search': { uris: URI[], hasNextPage: boolean }, + 'semantic_search': { uris: URI[], hasNextPage: boolean }, // --- 'edit': Promise, 'create_uri': {}, From ad736edd9e978170127114ade905d434d9b0eb57 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 20:29:59 -0700 Subject: [PATCH 14/54] 3.7 edits --- .github/workflows/build.yml | 246 +++++++++++++++++++++++++++++++++++- 1 file changed, 241 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b48c1875..67eb6119 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,8 @@ name: Build Void on: push: branches: [ main, release/*, github-workflow ] + pull_request: + branches: [ main ] workflow_dispatch: jobs: @@ -16,6 +18,7 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' + cache: 'npm' - name: Install dependencies run: | @@ -36,11 +39,62 @@ jobs: ARCHIVE_PATH=".build/linux/client/void-linux-x64.tar.gz" tar -czf $ARCHIVE_PATH -C .. VSCode-linux-x64 + - name: Generate checksum + run: | + cd .build/linux/client + sha256sum void-linux-x64.tar.gz > void-linux-x64.tar.gz.sha256 + - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: void-linux-x64 - path: .build/linux/client/void-linux-x64.tar.gz + path: | + .build/linux/client/void-linux-x64.tar.gz + .build/linux/client/void-linux-x64.tar.gz.sha256 + + build-linux-arm64: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-linux-arm64-min + + - name: Package + run: | + mkdir -p .build/linux/client + ARCHIVE_PATH=".build/linux/client/void-linux-arm64.tar.gz" + tar -czf $ARCHIVE_PATH -C .. VSCode-linux-arm64 + + - name: Generate checksum + run: | + cd .build/linux/client + sha256sum void-linux-arm64.tar.gz > void-linux-arm64.tar.gz.sha256 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-linux-arm64 + path: | + .build/linux/client/void-linux-arm64.tar.gz + .build/linux/client/void-linux-arm64.tar.gz.sha256 build-windows: runs-on: windows-latest @@ -52,6 +106,7 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' + cache: 'npm' - name: Install dependencies run: | @@ -70,11 +125,64 @@ jobs: Compress-Archive -Path ..\VSCode-win32-x64\* -DestinationPath .build\win32-x64\void-win32-x64.zip shell: pwsh + - name: Generate checksum + run: | + cd .build/win32-x64 + $hash = Get-FileHash -Algorithm SHA256 void-win32-x64.zip + $hash.Hash | Out-File -Encoding ascii void-win32-x64.zip.sha256 + shell: pwsh + - name: Upload artifacts uses: actions/upload-artifact@v4 with: name: void-win32-x64 - path: .build/win32-x64/void-win32-x64.zip + path: | + .build/win32-x64/void-win32-x64.zip + .build/win32-x64/void-win32-x64.zip.sha256 + + build-windows-arm64: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-win32-arm64-min + + - name: Package + run: | + mkdir -p .build/win32-arm64 + Compress-Archive -Path ..\VSCode-win32-arm64\* -DestinationPath .build\win32-arm64\void-win32-arm64.zip + shell: pwsh + + - name: Generate checksum + run: | + cd .build/win32-arm64 + $hash = Get-FileHash -Algorithm SHA256 void-win32-arm64.zip + $hash.Hash | Out-File -Encoding ascii void-win32-arm64.zip.sha256 + shell: pwsh + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-win32-arm64 + path: | + .build/win32-arm64/void-win32-arm64.zip + .build/win32-arm64/void-win32-arm64.zip.sha256 build-macos: runs-on: macos-latest @@ -89,6 +197,7 @@ jobs: uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' + cache: 'npm' - name: Install dependencies run: | @@ -116,6 +225,7 @@ jobs: echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - name: Import certificate + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} env: P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} @@ -138,6 +248,7 @@ jobs: security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) - name: Sign Application + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} env: CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} VSCODE_ARCH: ${{ matrix.arch }} @@ -147,16 +258,28 @@ jobs: node sign.js "${SIGN_DIR}" codesign --verify --verbose=4 "${SIGNED_DOTAPP}" + - name: Create Unsigned App (for PR builds) + if: ${{ github.event_name == 'pull_request' || github.repository != 'voideditor/void' }} + run: | + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + echo "SIGNED_DOTAPP_DIR=$(pwd)/../VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP=$(pwd)/../VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV + - name: Create DMG run: | cd "${SIGNED_DOTAPP_DIR}" - npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . + npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . || true GENERATED_DMG=$(ls *.dmg) mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" - codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" + + if [[ "${{ github.event_name }}" != "pull_request" && "${{ github.repository }}" == "voideditor/void" ]]; then + codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" + fi + echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV - name: Notarize + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} env: APPLE_ID: ${{ secrets.APPLE_ID }} TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} @@ -200,11 +323,18 @@ jobs: } EOF + - name: Generate checksum for DMG + run: | + cd "${SIGNED_DOTAPP_DIR}" + shasum -a 256 "Void-Installer-darwin-${{ matrix.arch }}.dmg" > "Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256" + - name: Upload DMG uses: actions/upload-artifact@v4 with: name: void-darwin-${{ matrix.arch }}-dmg - path: ${{ env.SIGNED_DMG }} + path: | + ${{ env.SIGNED_DMG }} + ${{ env.SIGNED_DOTAPP_DIR }}/Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256 - name: Upload Raw App uses: actions/upload-artifact@v4 @@ -217,3 +347,109 @@ jobs: with: name: void-darwin-${{ matrix.arch }}-hash path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json + + create-universal-macos: + needs: build-macos + runs-on: macos-latest + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Download x64 DMG + uses: actions/download-artifact@v3 + with: + name: void-darwin-x64-dmg + path: .build/darwin-x64 + + - name: Download arm64 DMG + uses: actions/download-artifact@v3 + with: + name: void-darwin-arm64-dmg + path: .build/darwin-arm64 + + - name: Download x64 App + uses: actions/download-artifact@v3 + with: + name: void-darwin-x64-rawapp + path: .build/darwin-x64-app + + - name: Download arm64 App + uses: actions/download-artifact@v3 + with: + name: void-darwin-arm64-rawapp + path: .build/darwin-arm64-app + + - name: Create Universal App working dir + run: | + mkdir -p .build/darwin-universal/{x64,arm64,universal} + + - name: Extract Apps + run: | + unzip -o .build/darwin-x64-app/Void-RawApp-darwin-x64.zip -d .build/darwin-universal/x64 + unzip -o .build/darwin-arm64-app/Void-RawApp-darwin-arm64.zip -d .build/darwin-universal/arm64 + + - name: Create Universal App + run: | + # Script to create universal binary + cd build/darwin + node create-universal-app.js \ + "$(pwd)/../../.build/darwin-universal/arm64/Void.app" \ + "$(pwd)/../../.build/darwin-universal/x64/Void.app" \ + "$(pwd)/../../.build/darwin-universal/universal/Void.app" + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Install create-dmg + run: npm install -g create-dmg + + - name: Create Universal DMG + run: | + cd .build/darwin-universal/universal + create-dmg --volname "Void Installer" Void.app . || true + GENERATED_DMG=$(ls *.dmg) + mv "${GENERATED_DMG}" "../../Void-Installer-darwin-universal.dmg" + cd ../.. + shasum -a 256 Void-Installer-darwin-universal.dmg > Void-Installer-darwin-universal.dmg.sha256 + + - name: Upload Universal DMG + uses: actions/upload-artifact@v4 + with: + name: void-darwin-universal + path: | + .build/Void-Installer-darwin-universal.dmg + .build/Void-Installer-darwin-universal.dmg.sha256 + + create-release: + needs: [build-linux, build-linux-arm64, build-windows, build-windows-arm64, build-macos, create-universal-macos] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Download all artifacts + uses: actions/download-artifact@v3 + with: + path: release-artifacts + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + files: | + release-artifacts/void-linux-x64/void-linux-x64.tar.gz + release-artifacts/void-linux-x64/void-linux-x64.tar.gz.sha256 + release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz + release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz.sha256 + release-artifacts/void-win32-x64/void-win32-x64.zip + release-artifacts/void-win32-x64/void-win32-x64.zip.sha256 + release-artifacts/void-win32-arm64/void-win32-arm64.zip + release-artifacts/void-win32-arm64/void-win32-arm64.zip.sha256 + release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg + release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg.sha256 + release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg + release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg.sha256 + release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg + release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg.sha256 + draft: true + generate_release_notes: true From 9133d6ecf524b86283976c5b717c97becffe5e1b Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 20:42:33 -0700 Subject: [PATCH 15/54] test --- .github/workflows/build.yml | 614 ++++++++++++------------------------ 1 file changed, 210 insertions(+), 404 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67eb6119..1c53b16d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,455 +1,261 @@ -name: Build Void +name: Cross-Platform Build on: push: - branches: [ main, release/*, github-workflow ] + branches: [ main ] pull_request: branches: [ main ] workflow_dispatch: + inputs: + architectures: + description: 'Target architectures (comma separated)' + required: false + default: 'x64' + type: string + release: + description: 'Create a release' + required: false + default: false + type: boolean jobs: - build-linux: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-linux-x64-min - - - name: Package - run: | - mkdir -p .build/linux/client - ARCHIVE_PATH=".build/linux/client/void-linux-x64.tar.gz" - tar -czf $ARCHIVE_PATH -C .. VSCode-linux-x64 - - - name: Generate checksum - run: | - cd .build/linux/client - sha256sum void-linux-x64.tar.gz > void-linux-x64.tar.gz.sha256 - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-linux-x64 - path: | - .build/linux/client/void-linux-x64.tar.gz - .build/linux/client/void-linux-x64.tar.gz.sha256 - - build-linux-arm64: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-linux-arm64-min - - - name: Package - run: | - mkdir -p .build/linux/client - ARCHIVE_PATH=".build/linux/client/void-linux-arm64.tar.gz" - tar -czf $ARCHIVE_PATH -C .. VSCode-linux-arm64 - - - name: Generate checksum - run: | - cd .build/linux/client - sha256sum void-linux-arm64.tar.gz > void-linux-arm64.tar.gz.sha256 - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-linux-arm64 - path: | - .build/linux/client/void-linux-arm64.tar.gz - .build/linux/client/void-linux-arm64.tar.gz.sha256 - - build-windows: - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-win32-x64-min - - - name: Package - run: | - mkdir -p .build/win32-x64 - Compress-Archive -Path ..\VSCode-win32-x64\* -DestinationPath .build\win32-x64\void-win32-x64.zip - shell: pwsh - - - name: Generate checksum - run: | - cd .build/win32-x64 - $hash = Get-FileHash -Algorithm SHA256 void-win32-x64.zip - $hash.Hash | Out-File -Encoding ascii void-win32-x64.zip.sha256 - shell: pwsh - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-win32-x64 - path: | - .build/win32-x64/void-win32-x64.zip - .build/win32-x64/void-win32-x64.zip.sha256 - - build-windows-arm64: - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-win32-arm64-min - - - name: Package - run: | - mkdir -p .build/win32-arm64 - Compress-Archive -Path ..\VSCode-win32-arm64\* -DestinationPath .build\win32-arm64\void-win32-arm64.zip - shell: pwsh - - - name: Generate checksum - run: | - cd .build/win32-arm64 - $hash = Get-FileHash -Algorithm SHA256 void-win32-arm64.zip - $hash.Hash | Out-File -Encoding ascii void-win32-arm64.zip.sha256 - shell: pwsh - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-win32-arm64 - path: | - .build/win32-arm64/void-win32-arm64.zip - .build/win32-arm64/void-win32-arm64.zip.sha256 - - build-macos: - runs-on: macos-latest + build: strategy: + fail-fast: false matrix: - arch: [arm64, x64] + os: [ubuntu-latest, windows-latest, macos-latest] + arch: [x64] + include: + # Add ARM64 builds conditionally + - os: ubuntu-latest + arch: arm64 + platform: linux + condition: ${{ contains(github.event.inputs.architectures, 'arm64') }} + - os: windows-latest + arch: arm64 + platform: win32 + condition: ${{ contains(github.event.inputs.architectures, 'arm64') }} + - os: macos-latest + arch: arm64 + platform: darwin + condition: ${{ contains(github.event.inputs.architectures, 'arm64') }} + # Default mappings + - os: ubuntu-latest + arch: x64 + platform: linux + - os: windows-latest + arch: x64 + platform: win32 + - os: macos-latest + arch: x64 + platform: darwin + + # Skip ARM64 jobs if not requested in manual workflow + if: ${{ !matrix.condition || matrix.condition }} + runs-on: ${{ matrix.os }} + steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version-file: '.nvmrc' + node-version: '18' cache: 'npm' + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + # Cache node_modules + - name: Cache node modules + uses: actions/cache@v3 + id: cache-node-modules + with: + path: node_modules + key: ${{ matrix.os }}-${{ matrix.arch }}-node-modules-${{ hashFiles('**/package-lock.json') }} + - name: Install dependencies - run: | - npm install - npm install -g node-gyp - npm install -g gulp-cli - npm install -g create-dmg - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-darwin-${{ matrix.arch }}-min - - - name: Create temporary working directory - run: | - WORKING_DIR="${{ runner.temp }}/VoidSign-${{ matrix.arch }}" - KEYCHAIN_DIR="${WORKING_DIR}/1_Keychain" - SIGN_DIR="${WORKING_DIR}/2_Signed" - mkdir -p "${WORKING_DIR}" "${KEYCHAIN_DIR}" "${SIGN_DIR}" - cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" - echo "WORKING_DIR=${WORKING_DIR}" >> $GITHUB_ENV - echo "KEYCHAIN_DIR=${KEYCHAIN_DIR}" >> $GITHUB_ENV - echo "SIGN_DIR=${SIGN_DIR}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP_DIR=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - - - name: Import certificate - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm ci env: - P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} - P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} - KEYCHAIN_PASSWORD: "temporary-password" + npm_config_arch: ${{ matrix.arch }} + # Skip binaries not needed for the build + ELECTRON_SKIP_BINARY_DOWNLOAD: 1 + + # Windows-specific build steps + - name: Windows Build + if: matrix.os == 'windows-latest' run: | - KEYCHAIN="${KEYCHAIN_DIR}/buildagent.keychain" - echo "KEYCHAIN=${KEYCHAIN}" >> $GITHUB_ENV - - # Create a new keychain - security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" - security set-keychain-settings -lut 21600 "${KEYCHAIN}" - security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" - - # Import certificate - echo "${P12_BASE64}" | base64 --decode > "${KEYCHAIN_DIR}/certificate.p12" - security import "${KEYCHAIN_DIR}/certificate.p12" -k "${KEYCHAIN}" -P "${P12_PASSWORD}" -T /usr/bin/codesign - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" > /dev/null - - # Add to keychain list - security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) - - - name: Sign Application - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + # Set up Windows-specific environment + npm run compile + npm run compile-build + npm run compile-extensions-build + npm run minify-vscode env: - CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} VSCODE_ARCH: ${{ matrix.arch }} + + # macOS-specific build steps + - name: macOS Build + if: matrix.os == 'macos-latest' run: | - export AGENT_TEMPDIRECTORY="${KEYCHAIN_DIR}" - cd $(pwd)/build/darwin - node sign.js "${SIGN_DIR}" - codesign --verify --verbose=4 "${SIGNED_DOTAPP}" - - - name: Create Unsigned App (for PR builds) - if: ${{ github.event_name == 'pull_request' || github.repository != 'voideditor/void' }} - run: | - cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" - echo "SIGNED_DOTAPP_DIR=$(pwd)/../VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP=$(pwd)/../VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - - - name: Create DMG - run: | - cd "${SIGNED_DOTAPP_DIR}" - npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . || true - GENERATED_DMG=$(ls *.dmg) - mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" - - if [[ "${{ github.event_name }}" != "pull_request" && "${{ github.repository }}" == "voideditor/void" ]]; then - codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" - fi - - echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV - - - name: Notarize - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + # Set up macOS-specific environment + npm run compile + npm run gulp vscode-darwin-${{ matrix.arch }}-min-ci env: - APPLE_ID: ${{ secrets.APPLE_ID }} - TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - APP_PASSWORD: ${{ secrets.APPLE_APP_PWD }} - KEYCHAIN_PASSWORD: "temporary-password" - run: | - # Store credentials for notarization - xcrun notarytool store-credentials "Void" \ - --apple-id "${APPLE_ID}" \ - --team-id "${TEAM_ID}" \ - --password "${APP_PASSWORD}" \ - --keychain "${KEYCHAIN}" + VSCODE_ARCH: ${{ matrix.arch }} - # Submit for notarization with a timeout - xcrun notarytool submit "${SIGNED_DMG}" \ - --keychain-profile "Void" \ - --keychain "${KEYCHAIN}" \ - --wait --timeout 2h + # Linux-specific build steps + - name: Linux Build + if: matrix.os == 'ubuntu-latest' + run: | + # Set up Linux-specific environment + npm run compile + npm run gulp vscode-linux-${{ matrix.arch }}-min-ci + env: + VSCODE_ARCH: ${{ matrix.arch }} + + # Setup macOS code signing + - name: Import macOS Code-Signing Certificates + if: matrix.os == 'macos-latest' + uses: apple-actions/import-codesign-certs@v1 + with: + p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} + p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} + keychain: build.keychain + keychain-password: ${{ github.run_id }} + + # macOS code signing + - name: macOS Code Signing + if: matrix.os == 'macos-latest' + run: | + # Set up code signing identity + CODESIGN_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep -oE "([0-9A-F]{40})" | head -n 1) + + # Compile and run the signing script + tsc -p build/darwin/tsconfig.json + node build/darwin/sign.js $(pwd) + env: + CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }} + AGENT_TEMPDIRECTORY: /tmp + VSCODE_ARCH: ${{ matrix.arch }} + + # Package application + - name: Package application + run: | + # Create distribution packages + if [ "${{ matrix.os }}" == "windows-latest" ]; then + npm run gulp vscode-win32-${{ matrix.arch }}-archive + elif [ "${{ matrix.os }}" == "macos-latest" ]; then + npm run gulp vscode-darwin-${{ matrix.arch }}-archive + elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then + npm run gulp vscode-linux-${{ matrix.arch }}-archive + fi + shell: bash + env: + VSCODE_ARCH: ${{ matrix.arch }} + PLATFORM: ${{ matrix.platform }} + + # macOS notarization (optional, only if code signed) + - name: macOS Notarization + if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' + run: | + # Find the path to the built app + APP_PATH=$(find "$(pwd)/VSCode-darwin-${{ matrix.arch }}" -name "*.app" -depth 1) + + # Zip the app for notarization + ditto -c -k --keepParent "$APP_PATH" "$(pwd)/app.zip" + + # Notarize the app + xcrun notarytool submit "$(pwd)/app.zip" --wait \ + --apple-id ${{ secrets.APPLE_ID }} \ + --password ${{ secrets.APPLE_APP_PASSWORD }} \ + --team-id ${{ secrets.APPLE_TEAM_ID }} # Staple the notarization ticket - xcrun stapler staple "${SIGNED_DMG}" + xcrun stapler staple "$APP_PATH" + env: + VSCODE_ARCH: ${{ matrix.arch }} - - name: Create Raw App Archive - run: | - cd "${SIGNED_DOTAPP_DIR}" - VOIDAPP=$(basename "${SIGNED_DOTAPP}") - ditto -c -k --sequesterRsrc --keepParent "${VOIDAPP}" "Void-RawApp-darwin-${{ matrix.arch }}.zip" - - - name: Generate Hash File - run: | - cd "${SIGNED_DOTAPP_DIR}" - SHA1=$(shasum -a 1 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) - SHA256=$(shasum -a 256 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) - TIMESTAMP=$(date +%s) - - cat > "Void-UpdJSON-darwin-${{ matrix.arch }}.json" << EOF - { - "sha256hash": "${SHA256}", - "hash": "${SHA1}", - "timestamp": ${TIMESTAMP} - } - EOF - - - name: Generate checksum for DMG - run: | - cd "${SIGNED_DOTAPP_DIR}" - shasum -a 256 "Void-Installer-darwin-${{ matrix.arch }}.dmg" > "Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256" - - - name: Upload DMG - uses: actions/upload-artifact@v4 + # Upload build artifacts + - name: Upload build artifacts + uses: actions/upload-artifact@v3 with: - name: void-darwin-${{ matrix.arch }}-dmg - path: | - ${{ env.SIGNED_DMG }} - ${{ env.SIGNED_DOTAPP_DIR }}/Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256 + name: vscode-${{ matrix.platform }}-${{ matrix.arch }} + path: .build/${{ matrix.platform }}-${{ matrix.arch }} + retention-days: 7 - - name: Upload Raw App - uses: actions/upload-artifact@v4 - with: - name: void-darwin-${{ matrix.arch }}-rawapp - path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-RawApp-darwin-${{ matrix.arch }}.zip + # Run tests matrix + test: + needs: build + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + arch: [x64] + test-type: [unit, integration] + include: + - os: ubuntu-latest + platform: linux + - os: windows-latest + platform: win32 + - os: macos-latest + platform: darwin - - name: Upload Hash File - uses: actions/upload-artifact@v4 - with: - name: void-darwin-${{ matrix.arch }}-hash - path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json + runs-on: ${{ matrix.os }} - create-universal-macos: - needs: build-macos - runs-on: macos-latest - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} steps: - - name: Checkout + - name: Checkout repository uses: actions/checkout@v3 - - name: Download x64 DMG - uses: actions/download-artifact@v3 - with: - name: void-darwin-x64-dmg - path: .build/darwin-x64 - - - name: Download arm64 DMG - uses: actions/download-artifact@v3 - with: - name: void-darwin-arm64-dmg - path: .build/darwin-arm64 - - - name: Download x64 App - uses: actions/download-artifact@v3 - with: - name: void-darwin-x64-rawapp - path: .build/darwin-x64-app - - - name: Download arm64 App - uses: actions/download-artifact@v3 - with: - name: void-darwin-arm64-rawapp - path: .build/darwin-arm64-app - - - name: Create Universal App working dir - run: | - mkdir -p .build/darwin-universal/{x64,arm64,universal} - - - name: Extract Apps - run: | - unzip -o .build/darwin-x64-app/Void-RawApp-darwin-x64.zip -d .build/darwin-universal/x64 - unzip -o .build/darwin-arm64-app/Void-RawApp-darwin-arm64.zip -d .build/darwin-universal/arm64 - - - name: Create Universal App - run: | - # Script to create universal binary - cd build/darwin - node create-universal-app.js \ - "$(pwd)/../../.build/darwin-universal/arm64/Void.app" \ - "$(pwd)/../../.build/darwin-universal/x64/Void.app" \ - "$(pwd)/../../.build/darwin-universal/universal/Void.app" - - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version-file: '.nvmrc' + node-version: '18' - - name: Install create-dmg - run: npm install -g create-dmg - - - name: Create Universal DMG - run: | - cd .build/darwin-universal/universal - create-dmg --volname "Void Installer" Void.app . || true - GENERATED_DMG=$(ls *.dmg) - mv "${GENERATED_DMG}" "../../Void-Installer-darwin-universal.dmg" - cd ../.. - shasum -a 256 Void-Installer-darwin-universal.dmg > Void-Installer-darwin-universal.dmg.sha256 - - - name: Upload Universal DMG - uses: actions/upload-artifact@v4 + - name: Download build artifacts + uses: actions/download-artifact@v3 with: - name: void-darwin-universal - path: | - .build/Void-Installer-darwin-universal.dmg - .build/Void-Installer-darwin-universal.dmg.sha256 + name: vscode-${{ matrix.platform }}-${{ matrix.arch }} + path: .build/${{ matrix.platform }}-${{ matrix.arch }} - create-release: - needs: [build-linux, build-linux-arm64, build-windows, build-windows-arm64, build-macos, create-universal-macos] + - name: Run ${{ matrix.test-type }} tests + run: | + if [ "${{ matrix.test-type }}" == "unit" ]; then + npm run test-${{ matrix.platform }} + else + npm run integration-test-${{ matrix.platform }} + fi + shell: bash + env: + VSCODE_ARCH: ${{ matrix.arch }} + + # Create release if specified + release: + needs: [build, test] + if: github.event.inputs.release == 'true' runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Download all artifacts uses: actions/download-artifact@v3 with: - path: release-artifacts + path: dist - - name: Create GitHub Release + - name: Create Release + id: create_release uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - files: | - release-artifacts/void-linux-x64/void-linux-x64.tar.gz - release-artifacts/void-linux-x64/void-linux-x64.tar.gz.sha256 - release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz - release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz.sha256 - release-artifacts/void-win32-x64/void-win32-x64.zip - release-artifacts/void-win32-x64/void-win32-x64.zip.sha256 - release-artifacts/void-win32-arm64/void-win32-arm64.zip - release-artifacts/void-win32-arm64/void-win32-arm64.zip.sha256 - release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg - release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg.sha256 - release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg - release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg.sha256 - release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg - release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg.sha256 + tag_name: v${{ github.run_number }} + name: Release v${{ github.run_number }} draft: true - generate_release_notes: true + files: dist/**/* From 46ca49e02b2093950ffacb0fa41ca46c63b995b6 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 20:43:57 -0700 Subject: [PATCH 16/54] + --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c53b16d..2cf41a23 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Cross-Platform Build on: push: - branches: [ main ] + branches: [ main, github-workflow ] pull_request: branches: [ main ] workflow_dispatch: From 4951116a6c177cebe1f6b0a395c4ee1d0a6b6a68 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 20:46:02 -0700 Subject: [PATCH 17/54] test --- .github/workflows/build.yml | 63 ++++++++++++++++++++++--------------- 1 file changed, 38 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2cf41a23..7b0a7887 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,23 +23,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - arch: [x64] include: - # Add ARM64 builds conditionally - - os: ubuntu-latest - arch: arm64 - platform: linux - condition: ${{ contains(github.event.inputs.architectures, 'arm64') }} - - os: windows-latest - arch: arm64 - platform: win32 - condition: ${{ contains(github.event.inputs.architectures, 'arm64') }} - - os: macos-latest - arch: arm64 - platform: darwin - condition: ${{ contains(github.event.inputs.architectures, 'arm64') }} - # Default mappings + # Default x64 builds that always run - os: ubuntu-latest arch: x64 platform: linux @@ -49,9 +34,22 @@ jobs: - os: macos-latest arch: x64 platform: darwin + # Conditional ARM64 builds + - os: ubuntu-latest + arch: arm64 + platform: linux + runs-on-arm64: true + - os: windows-latest + arch: arm64 + platform: win32 + runs-on-arm64: true + - os: macos-latest + arch: arm64 + platform: darwin + runs-on-arm64: true - # Skip ARM64 jobs if not requested in manual workflow - if: ${{ !matrix.condition || matrix.condition }} + # ARM64 runs only when explicitly requested + if: ${{ !matrix.runs-on-arm64 || contains(github.event.inputs.architectures, 'arm64') }} runs-on: ${{ matrix.os }} steps: @@ -121,7 +119,7 @@ jobs: # Setup macOS code signing - name: Import macOS Code-Signing Certificates - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' uses: apple-actions/import-codesign-certs@v1 with: p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} @@ -131,7 +129,7 @@ jobs: # macOS code signing - name: macOS Code Signing - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' run: | # Set up code signing identity CODESIGN_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep -oE "([0-9A-F]{40})" | head -n 1) @@ -195,16 +193,31 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - arch: [x64] - test-type: [unit, integration] include: - os: ubuntu-latest + arch: x64 platform: linux + test-type: unit + - os: ubuntu-latest + arch: x64 + platform: linux + test-type: integration - os: windows-latest + arch: x64 platform: win32 + test-type: unit + - os: windows-latest + arch: x64 + platform: win32 + test-type: integration - os: macos-latest + arch: x64 platform: darwin + test-type: unit + - os: macos-latest + arch: x64 + platform: darwin + test-type: integration runs-on: ${{ matrix.os }} @@ -226,9 +239,9 @@ jobs: - name: Run ${{ matrix.test-type }} tests run: | if [ "${{ matrix.test-type }}" == "unit" ]; then - npm run test-${{ matrix.platform }} + npm run test-node # Assuming this is your unit test command else - npm run integration-test-${{ matrix.platform }} + npm run test-browser # Assuming this is your integration test command fi shell: bash env: From b58ad5f8768037a66d9f3be48223ff4064513544 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 20:48:35 -0700 Subject: [PATCH 18/54] update --- .github/workflows/build.yml | 179 ++++++++++++++++++++++++++++++++---- 1 file changed, 159 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b0a7887..334f5b81 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,12 +19,12 @@ on: type: boolean jobs: - build: + # Build jobs for x64 architecture - always run + build-x64: strategy: fail-fast: false matrix: include: - # Default x64 builds that always run - os: ubuntu-latest arch: x64 platform: linux @@ -34,22 +34,7 @@ jobs: - os: macos-latest arch: x64 platform: darwin - # Conditional ARM64 builds - - os: ubuntu-latest - arch: arm64 - platform: linux - runs-on-arm64: true - - os: windows-latest - arch: arm64 - platform: win32 - runs-on-arm64: true - - os: macos-latest - arch: arm64 - platform: darwin - runs-on-arm64: true - - # ARM64 runs only when explicitly requested - if: ${{ !matrix.runs-on-arm64 || contains(github.event.inputs.architectures, 'arm64') }} + runs-on: ${{ matrix.os }} steps: @@ -187,9 +172,163 @@ jobs: path: .build/${{ matrix.platform }}-${{ matrix.arch }} retention-days: 7 + # Build jobs for ARM64 architecture - only run when requested + build-arm64: + if: ${{ contains(github.event.inputs.architectures, 'arm64') }} + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-latest + arch: arm64 + platform: linux + - os: windows-latest + arch: arm64 + platform: win32 + - os: macos-latest + arch: arm64 + platform: darwin + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + cache: 'npm' + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: '3.x' + + # Cache node_modules + - name: Cache node modules + uses: actions/cache@v3 + id: cache-node-modules + with: + path: node_modules + key: ${{ matrix.os }}-${{ matrix.arch }}-node-modules-${{ hashFiles('**/package-lock.json') }} + + - name: Install dependencies + if: steps.cache-node-modules.outputs.cache-hit != 'true' + run: npm ci + env: + npm_config_arch: ${{ matrix.arch }} + # Skip binaries not needed for the build + ELECTRON_SKIP_BINARY_DOWNLOAD: 1 + + # Windows-specific build steps + - name: Windows Build + if: matrix.os == 'windows-latest' + run: | + # Set up Windows-specific environment + npm run compile + npm run compile-build + npm run compile-extensions-build + npm run minify-vscode + env: + VSCODE_ARCH: ${{ matrix.arch }} + + # macOS-specific build steps + - name: macOS Build + if: matrix.os == 'macos-latest' + run: | + # Set up macOS-specific environment + npm run compile + npm run gulp vscode-darwin-${{ matrix.arch }}-min-ci + env: + VSCODE_ARCH: ${{ matrix.arch }} + + # Linux-specific build steps + - name: Linux Build + if: matrix.os == 'ubuntu-latest' + run: | + # Set up Linux-specific environment + npm run compile + npm run gulp vscode-linux-${{ matrix.arch }}-min-ci + env: + VSCODE_ARCH: ${{ matrix.arch }} + + # Setup macOS code signing + - name: Import macOS Code-Signing Certificates + if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' + uses: apple-actions/import-codesign-certs@v1 + with: + p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} + p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} + keychain: build.keychain + keychain-password: ${{ github.run_id }} + + # macOS code signing + - name: macOS Code Signing + if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' + run: | + # Set up code signing identity + CODESIGN_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep -oE "([0-9A-F]{40})" | head -n 1) + + # Compile and run the signing script + tsc -p build/darwin/tsconfig.json + node build/darwin/sign.js $(pwd) + env: + CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }} + AGENT_TEMPDIRECTORY: /tmp + VSCODE_ARCH: ${{ matrix.arch }} + + # Package application + - name: Package application + run: | + # Create distribution packages + if [ "${{ matrix.os }}" == "windows-latest" ]; then + npm run gulp vscode-win32-${{ matrix.arch }}-archive + elif [ "${{ matrix.os }}" == "macos-latest" ]; then + npm run gulp vscode-darwin-${{ matrix.arch }}-archive + elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then + npm run gulp vscode-linux-${{ matrix.arch }}-archive + fi + shell: bash + env: + VSCODE_ARCH: ${{ matrix.arch }} + PLATFORM: ${{ matrix.platform }} + + # macOS notarization (optional, only if code signed) + - name: macOS Notarization + if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' + run: | + # Find the path to the built app + APP_PATH=$(find "$(pwd)/VSCode-darwin-${{ matrix.arch }}" -name "*.app" -depth 1) + + # Zip the app for notarization + ditto -c -k --keepParent "$APP_PATH" "$(pwd)/app.zip" + + # Notarize the app + xcrun notarytool submit "$(pwd)/app.zip" --wait \ + --apple-id ${{ secrets.APPLE_ID }} \ + --password ${{ secrets.APPLE_APP_PASSWORD }} \ + --team-id ${{ secrets.APPLE_TEAM_ID }} + + # Staple the notarization ticket + xcrun stapler staple "$APP_PATH" + env: + VSCODE_ARCH: ${{ matrix.arch }} + + # Upload build artifacts + - name: Upload build artifacts + uses: actions/upload-artifact@v3 + with: + name: vscode-${{ matrix.platform }}-${{ matrix.arch }} + path: .build/${{ matrix.platform }}-${{ matrix.arch }} + retention-days: 7 + # Run tests matrix test: - needs: build + needs: build-x64 strategy: fail-fast: false matrix: @@ -249,7 +388,7 @@ jobs: # Create release if specified release: - needs: [build, test] + needs: [build-x64, test] if: github.event.inputs.release == 'true' runs-on: ubuntu-latest From 51b19a68318a009e7fade9afe12c2c9bdef2a75a Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 20:53:37 -0700 Subject: [PATCH 19/54] update --- .github/workflows/build.yml | 124 +++++------------------------------- 1 file changed, 16 insertions(+), 108 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 334f5b81..66400fc8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,24 +39,24 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '18' cache: 'npm' - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' # Cache node_modules - name: Cache node modules - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-node-modules with: path: node_modules @@ -102,31 +102,6 @@ jobs: env: VSCODE_ARCH: ${{ matrix.arch }} - # Setup macOS code signing - - name: Import macOS Code-Signing Certificates - if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' - uses: apple-actions/import-codesign-certs@v1 - with: - p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} - p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} - keychain: build.keychain - keychain-password: ${{ github.run_id }} - - # macOS code signing - - name: macOS Code Signing - if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' - run: | - # Set up code signing identity - CODESIGN_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep -oE "([0-9A-F]{40})" | head -n 1) - - # Compile and run the signing script - tsc -p build/darwin/tsconfig.json - node build/darwin/sign.js $(pwd) - env: - CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }} - AGENT_TEMPDIRECTORY: /tmp - VSCODE_ARCH: ${{ matrix.arch }} - # Package application - name: Package application run: | @@ -143,30 +118,9 @@ jobs: VSCODE_ARCH: ${{ matrix.arch }} PLATFORM: ${{ matrix.platform }} - # macOS notarization (optional, only if code signed) - - name: macOS Notarization - if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' - run: | - # Find the path to the built app - APP_PATH=$(find "$(pwd)/VSCode-darwin-${{ matrix.arch }}" -name "*.app" -depth 1) - - # Zip the app for notarization - ditto -c -k --keepParent "$APP_PATH" "$(pwd)/app.zip" - - # Notarize the app - xcrun notarytool submit "$(pwd)/app.zip" --wait \ - --apple-id ${{ secrets.APPLE_ID }} \ - --password ${{ secrets.APPLE_APP_PASSWORD }} \ - --team-id ${{ secrets.APPLE_TEAM_ID }} - - # Staple the notarization ticket - xcrun stapler staple "$APP_PATH" - env: - VSCODE_ARCH: ${{ matrix.arch }} - # Upload build artifacts - name: Upload build artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: vscode-${{ matrix.platform }}-${{ matrix.arch }} path: .build/${{ matrix.platform }}-${{ matrix.arch }} @@ -193,24 +147,24 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '18' cache: 'npm' - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.x' # Cache node_modules - name: Cache node modules - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-node-modules with: path: node_modules @@ -255,31 +209,6 @@ jobs: npm run gulp vscode-linux-${{ matrix.arch }}-min-ci env: VSCODE_ARCH: ${{ matrix.arch }} - - # Setup macOS code signing - - name: Import macOS Code-Signing Certificates - if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' - uses: apple-actions/import-codesign-certs@v1 - with: - p12-file-base64: ${{ secrets.MACOS_CERTIFICATE }} - p12-password: ${{ secrets.MACOS_CERTIFICATE_PWD }} - keychain: build.keychain - keychain-password: ${{ github.run_id }} - - # macOS code signing - - name: macOS Code Signing - if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' - run: | - # Set up code signing identity - CODESIGN_IDENTITY=$(security find-identity -v -p codesigning build.keychain | grep -oE "([0-9A-F]{40})" | head -n 1) - - # Compile and run the signing script - tsc -p build/darwin/tsconfig.json - node build/darwin/sign.js $(pwd) - env: - CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }} - AGENT_TEMPDIRECTORY: /tmp - VSCODE_ARCH: ${{ matrix.arch }} # Package application - name: Package application @@ -297,30 +226,9 @@ jobs: VSCODE_ARCH: ${{ matrix.arch }} PLATFORM: ${{ matrix.platform }} - # macOS notarization (optional, only if code signed) - - name: macOS Notarization - if: matrix.os == 'macos-latest' && github.event.inputs.release == 'true' - run: | - # Find the path to the built app - APP_PATH=$(find "$(pwd)/VSCode-darwin-${{ matrix.arch }}" -name "*.app" -depth 1) - - # Zip the app for notarization - ditto -c -k --keepParent "$APP_PATH" "$(pwd)/app.zip" - - # Notarize the app - xcrun notarytool submit "$(pwd)/app.zip" --wait \ - --apple-id ${{ secrets.APPLE_ID }} \ - --password ${{ secrets.APPLE_APP_PASSWORD }} \ - --team-id ${{ secrets.APPLE_TEAM_ID }} - - # Staple the notarization ticket - xcrun stapler staple "$APP_PATH" - env: - VSCODE_ARCH: ${{ matrix.arch }} - # Upload build artifacts - name: Upload build artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: vscode-${{ matrix.platform }}-${{ matrix.arch }} path: .build/${{ matrix.platform }}-${{ matrix.arch }} @@ -362,15 +270,15 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: '18' - name: Download build artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: vscode-${{ matrix.platform }}-${{ matrix.arch }} path: .build/${{ matrix.platform }}-${{ matrix.arch }} @@ -394,10 +302,10 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download all artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: dist @@ -410,4 +318,4 @@ jobs: tag_name: v${{ github.run_number }} name: Release v${{ github.run_number }} draft: true - files: dist/**/* + files: dist/**/* \ No newline at end of file From 1a4623589c914995fd601b6ff9b794e3371ba57b Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 20:54:30 -0700 Subject: [PATCH 20/54] rm. ci --- .github/workflows/build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66400fc8..ee59c2b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,7 +34,7 @@ jobs: - os: macos-latest arch: x64 platform: darwin - + runs-on: ${{ matrix.os }} steps: @@ -64,7 +64,7 @@ jobs: - name: Install dependencies if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm ci + run: "# npm ci" env: npm_config_arch: ${{ matrix.arch }} # Skip binaries not needed for the build @@ -142,9 +142,9 @@ jobs: - os: macos-latest arch: arm64 platform: darwin - + runs-on: ${{ matrix.os }} - + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -156,7 +156,7 @@ jobs: with: node-version: '18' cache: 'npm' - + - name: Setup Python uses: actions/setup-python@v5 with: @@ -169,15 +169,15 @@ jobs: with: path: node_modules key: ${{ matrix.os }}-${{ matrix.arch }}-node-modules-${{ hashFiles('**/package-lock.json') }} - + - name: Install dependencies if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: npm ci + run: "# npm ci" env: npm_config_arch: ${{ matrix.arch }} # Skip binaries not needed for the build ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - + # Windows-specific build steps - name: Windows Build if: matrix.os == 'windows-latest' @@ -189,7 +189,7 @@ jobs: npm run minify-vscode env: VSCODE_ARCH: ${{ matrix.arch }} - + # macOS-specific build steps - name: macOS Build if: matrix.os == 'macos-latest' @@ -199,7 +199,7 @@ jobs: npm run gulp vscode-darwin-${{ matrix.arch }}-min-ci env: VSCODE_ARCH: ${{ matrix.arch }} - + # Linux-specific build steps - name: Linux Build if: matrix.os == 'ubuntu-latest' @@ -318,4 +318,4 @@ jobs: tag_name: v${{ github.run_number }} name: Release v${{ github.run_number }} draft: true - files: dist/**/* \ No newline at end of file + files: dist/**/* From a854a341d3e5138e649d3dd58f50b2f139664a74 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 20:56:47 -0700 Subject: [PATCH 21/54] revert to 3.7 --- .github/workflows/build.yml | 744 +++++++++++++++++++++--------------- 1 file changed, 439 insertions(+), 305 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee59c2b5..67eb6119 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,321 +1,455 @@ -name: Cross-Platform Build +name: Build Void on: push: - branches: [ main, github-workflow ] + branches: [ main, release/*, github-workflow ] pull_request: branches: [ main ] workflow_dispatch: - inputs: - architectures: - description: 'Target architectures (comma separated)' - required: false - default: 'x64' - type: string - release: - description: 'Create a release' - required: false - default: false - type: boolean jobs: - # Build jobs for x64 architecture - always run - build-x64: - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - arch: x64 - platform: linux - - os: windows-latest - arch: x64 - platform: win32 - - os: macos-latest - arch: x64 - platform: darwin - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - cache: 'npm' - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - # Cache node_modules - - name: Cache node modules - uses: actions/cache@v4 - id: cache-node-modules - with: - path: node_modules - key: ${{ matrix.os }}-${{ matrix.arch }}-node-modules-${{ hashFiles('**/package-lock.json') }} - - - name: Install dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: "# npm ci" - env: - npm_config_arch: ${{ matrix.arch }} - # Skip binaries not needed for the build - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - - # Windows-specific build steps - - name: Windows Build - if: matrix.os == 'windows-latest' - run: | - # Set up Windows-specific environment - npm run compile - npm run compile-build - npm run compile-extensions-build - npm run minify-vscode - env: - VSCODE_ARCH: ${{ matrix.arch }} - - # macOS-specific build steps - - name: macOS Build - if: matrix.os == 'macos-latest' - run: | - # Set up macOS-specific environment - npm run compile - npm run gulp vscode-darwin-${{ matrix.arch }}-min-ci - env: - VSCODE_ARCH: ${{ matrix.arch }} - - # Linux-specific build steps - - name: Linux Build - if: matrix.os == 'ubuntu-latest' - run: | - # Set up Linux-specific environment - npm run compile - npm run gulp vscode-linux-${{ matrix.arch }}-min-ci - env: - VSCODE_ARCH: ${{ matrix.arch }} - - # Package application - - name: Package application - run: | - # Create distribution packages - if [ "${{ matrix.os }}" == "windows-latest" ]; then - npm run gulp vscode-win32-${{ matrix.arch }}-archive - elif [ "${{ matrix.os }}" == "macos-latest" ]; then - npm run gulp vscode-darwin-${{ matrix.arch }}-archive - elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then - npm run gulp vscode-linux-${{ matrix.arch }}-archive - fi - shell: bash - env: - VSCODE_ARCH: ${{ matrix.arch }} - PLATFORM: ${{ matrix.platform }} - - # Upload build artifacts - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: vscode-${{ matrix.platform }}-${{ matrix.arch }} - path: .build/${{ matrix.platform }}-${{ matrix.arch }} - retention-days: 7 - - # Build jobs for ARM64 architecture - only run when requested - build-arm64: - if: ${{ contains(github.event.inputs.architectures, 'arm64') }} - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - arch: arm64 - platform: linux - - os: windows-latest - arch: arm64 - platform: win32 - - os: macos-latest - arch: arm64 - platform: darwin - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - cache: 'npm' - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - # Cache node_modules - - name: Cache node modules - uses: actions/cache@v4 - id: cache-node-modules - with: - path: node_modules - key: ${{ matrix.os }}-${{ matrix.arch }}-node-modules-${{ hashFiles('**/package-lock.json') }} - - - name: Install dependencies - if: steps.cache-node-modules.outputs.cache-hit != 'true' - run: "# npm ci" - env: - npm_config_arch: ${{ matrix.arch }} - # Skip binaries not needed for the build - ELECTRON_SKIP_BINARY_DOWNLOAD: 1 - - # Windows-specific build steps - - name: Windows Build - if: matrix.os == 'windows-latest' - run: | - # Set up Windows-specific environment - npm run compile - npm run compile-build - npm run compile-extensions-build - npm run minify-vscode - env: - VSCODE_ARCH: ${{ matrix.arch }} - - # macOS-specific build steps - - name: macOS Build - if: matrix.os == 'macos-latest' - run: | - # Set up macOS-specific environment - npm run compile - npm run gulp vscode-darwin-${{ matrix.arch }}-min-ci - env: - VSCODE_ARCH: ${{ matrix.arch }} - - # Linux-specific build steps - - name: Linux Build - if: matrix.os == 'ubuntu-latest' - run: | - # Set up Linux-specific environment - npm run compile - npm run gulp vscode-linux-${{ matrix.arch }}-min-ci - env: - VSCODE_ARCH: ${{ matrix.arch }} - - # Package application - - name: Package application - run: | - # Create distribution packages - if [ "${{ matrix.os }}" == "windows-latest" ]; then - npm run gulp vscode-win32-${{ matrix.arch }}-archive - elif [ "${{ matrix.os }}" == "macos-latest" ]; then - npm run gulp vscode-darwin-${{ matrix.arch }}-archive - elif [ "${{ matrix.os }}" == "ubuntu-latest" ]; then - npm run gulp vscode-linux-${{ matrix.arch }}-archive - fi - shell: bash - env: - VSCODE_ARCH: ${{ matrix.arch }} - PLATFORM: ${{ matrix.platform }} - - # Upload build artifacts - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: vscode-${{ matrix.platform }}-${{ matrix.arch }} - path: .build/${{ matrix.platform }}-${{ matrix.arch }} - retention-days: 7 - - # Run tests matrix - test: - needs: build-x64 - strategy: - fail-fast: false - matrix: - include: - - os: ubuntu-latest - arch: x64 - platform: linux - test-type: unit - - os: ubuntu-latest - arch: x64 - platform: linux - test-type: integration - - os: windows-latest - arch: x64 - platform: win32 - test-type: unit - - os: windows-latest - arch: x64 - platform: win32 - test-type: integration - - os: macos-latest - arch: x64 - platform: darwin - test-type: unit - - os: macos-latest - arch: x64 - platform: darwin - test-type: integration - - runs-on: ${{ matrix.os }} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - - - name: Download build artifacts - uses: actions/download-artifact@v4 - with: - name: vscode-${{ matrix.platform }}-${{ matrix.arch }} - path: .build/${{ matrix.platform }}-${{ matrix.arch }} - - - name: Run ${{ matrix.test-type }} tests - run: | - if [ "${{ matrix.test-type }}" == "unit" ]; then - npm run test-node # Assuming this is your unit test command - else - npm run test-browser # Assuming this is your integration test command - fi - shell: bash - env: - VSCODE_ARCH: ${{ matrix.arch }} - - # Create release if specified - release: - needs: [build-x64, test] - if: github.event.inputs.release == 'true' + build-linux: runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v3 - - name: Download all artifacts - uses: actions/download-artifact@v4 + - name: Setup Node.js + uses: actions/setup-node@v3 with: - path: dist + node-version-file: '.nvmrc' + cache: 'npm' - - name: Create Release - id: create_release - uses: softprops/action-gh-release@v1 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-linux-x64-min + + - name: Package + run: | + mkdir -p .build/linux/client + ARCHIVE_PATH=".build/linux/client/void-linux-x64.tar.gz" + tar -czf $ARCHIVE_PATH -C .. VSCode-linux-x64 + + - name: Generate checksum + run: | + cd .build/linux/client + sha256sum void-linux-x64.tar.gz > void-linux-x64.tar.gz.sha256 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-linux-x64 + path: | + .build/linux/client/void-linux-x64.tar.gz + .build/linux/client/void-linux-x64.tar.gz.sha256 + + build-linux-arm64: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-linux-arm64-min + + - name: Package + run: | + mkdir -p .build/linux/client + ARCHIVE_PATH=".build/linux/client/void-linux-arm64.tar.gz" + tar -czf $ARCHIVE_PATH -C .. VSCode-linux-arm64 + + - name: Generate checksum + run: | + cd .build/linux/client + sha256sum void-linux-arm64.tar.gz > void-linux-arm64.tar.gz.sha256 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-linux-arm64 + path: | + .build/linux/client/void-linux-arm64.tar.gz + .build/linux/client/void-linux-arm64.tar.gz.sha256 + + build-windows: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-win32-x64-min + + - name: Package + run: | + mkdir -p .build/win32-x64 + Compress-Archive -Path ..\VSCode-win32-x64\* -DestinationPath .build\win32-x64\void-win32-x64.zip + shell: pwsh + + - name: Generate checksum + run: | + cd .build/win32-x64 + $hash = Get-FileHash -Algorithm SHA256 void-win32-x64.zip + $hash.Hash | Out-File -Encoding ascii void-win32-x64.zip.sha256 + shell: pwsh + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-win32-x64 + path: | + .build/win32-x64/void-win32-x64.zip + .build/win32-x64/void-win32-x64.zip.sha256 + + build-windows-arm64: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-win32-arm64-min + + - name: Package + run: | + mkdir -p .build/win32-arm64 + Compress-Archive -Path ..\VSCode-win32-arm64\* -DestinationPath .build\win32-arm64\void-win32-arm64.zip + shell: pwsh + + - name: Generate checksum + run: | + cd .build/win32-arm64 + $hash = Get-FileHash -Algorithm SHA256 void-win32-arm64.zip + $hash.Hash | Out-File -Encoding ascii void-win32-arm64.zip.sha256 + shell: pwsh + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-win32-arm64 + path: | + .build/win32-arm64/void-win32-arm64.zip + .build/win32-arm64/void-win32-arm64.zip.sha256 + + build-macos: + runs-on: macos-latest + strategy: + matrix: + arch: [arm64, x64] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + npm install + npm install -g node-gyp + npm install -g gulp-cli + npm install -g create-dmg + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-darwin-${{ matrix.arch }}-min + + - name: Create temporary working directory + run: | + WORKING_DIR="${{ runner.temp }}/VoidSign-${{ matrix.arch }}" + KEYCHAIN_DIR="${WORKING_DIR}/1_Keychain" + SIGN_DIR="${WORKING_DIR}/2_Signed" + mkdir -p "${WORKING_DIR}" "${KEYCHAIN_DIR}" "${SIGN_DIR}" + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + echo "WORKING_DIR=${WORKING_DIR}" >> $GITHUB_ENV + echo "KEYCHAIN_DIR=${KEYCHAIN_DIR}" >> $GITHUB_ENV + echo "SIGN_DIR=${SIGN_DIR}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP_DIR=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV + + - name: Import certificate + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} + P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} + KEYCHAIN_PASSWORD: "temporary-password" + run: | + KEYCHAIN="${KEYCHAIN_DIR}/buildagent.keychain" + echo "KEYCHAIN=${KEYCHAIN}" >> $GITHUB_ENV + + # Create a new keychain + security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" + security set-keychain-settings -lut 21600 "${KEYCHAIN}" + security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" + + # Import certificate + echo "${P12_BASE64}" | base64 --decode > "${KEYCHAIN_DIR}/certificate.p12" + security import "${KEYCHAIN_DIR}/certificate.p12" -k "${KEYCHAIN}" -P "${P12_PASSWORD}" -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" > /dev/null + + # Add to keychain list + security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) + + - name: Sign Application + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + env: + CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} + VSCODE_ARCH: ${{ matrix.arch }} + run: | + export AGENT_TEMPDIRECTORY="${KEYCHAIN_DIR}" + cd $(pwd)/build/darwin + node sign.js "${SIGN_DIR}" + codesign --verify --verbose=4 "${SIGNED_DOTAPP}" + + - name: Create Unsigned App (for PR builds) + if: ${{ github.event_name == 'pull_request' || github.repository != 'voideditor/void' }} + run: | + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + echo "SIGNED_DOTAPP_DIR=$(pwd)/../VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP=$(pwd)/../VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV + + - name: Create DMG + run: | + cd "${SIGNED_DOTAPP_DIR}" + npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . || true + GENERATED_DMG=$(ls *.dmg) + mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" + + if [[ "${{ github.event_name }}" != "pull_request" && "${{ github.repository }}" == "voideditor/void" ]]; then + codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" + fi + + echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV + + - name: Notarize + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + APP_PASSWORD: ${{ secrets.APPLE_APP_PWD }} + KEYCHAIN_PASSWORD: "temporary-password" + run: | + # Store credentials for notarization + xcrun notarytool store-credentials "Void" \ + --apple-id "${APPLE_ID}" \ + --team-id "${TEAM_ID}" \ + --password "${APP_PASSWORD}" \ + --keychain "${KEYCHAIN}" + + # Submit for notarization with a timeout + xcrun notarytool submit "${SIGNED_DMG}" \ + --keychain-profile "Void" \ + --keychain "${KEYCHAIN}" \ + --wait --timeout 2h + + # Staple the notarization ticket + xcrun stapler staple "${SIGNED_DMG}" + + - name: Create Raw App Archive + run: | + cd "${SIGNED_DOTAPP_DIR}" + VOIDAPP=$(basename "${SIGNED_DOTAPP}") + ditto -c -k --sequesterRsrc --keepParent "${VOIDAPP}" "Void-RawApp-darwin-${{ matrix.arch }}.zip" + + - name: Generate Hash File + run: | + cd "${SIGNED_DOTAPP_DIR}" + SHA1=$(shasum -a 1 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) + SHA256=$(shasum -a 256 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) + TIMESTAMP=$(date +%s) + + cat > "Void-UpdJSON-darwin-${{ matrix.arch }}.json" << EOF + { + "sha256hash": "${SHA256}", + "hash": "${SHA1}", + "timestamp": ${TIMESTAMP} + } + EOF + + - name: Generate checksum for DMG + run: | + cd "${SIGNED_DOTAPP_DIR}" + shasum -a 256 "Void-Installer-darwin-${{ matrix.arch }}.dmg" > "Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256" + + - name: Upload DMG + uses: actions/upload-artifact@v4 with: - tag_name: v${{ github.run_number }} - name: Release v${{ github.run_number }} + name: void-darwin-${{ matrix.arch }}-dmg + path: | + ${{ env.SIGNED_DMG }} + ${{ env.SIGNED_DOTAPP_DIR }}/Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256 + + - name: Upload Raw App + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-rawapp + path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-RawApp-darwin-${{ matrix.arch }}.zip + + - name: Upload Hash File + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-hash + path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json + + create-universal-macos: + needs: build-macos + runs-on: macos-latest + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Download x64 DMG + uses: actions/download-artifact@v3 + with: + name: void-darwin-x64-dmg + path: .build/darwin-x64 + + - name: Download arm64 DMG + uses: actions/download-artifact@v3 + with: + name: void-darwin-arm64-dmg + path: .build/darwin-arm64 + + - name: Download x64 App + uses: actions/download-artifact@v3 + with: + name: void-darwin-x64-rawapp + path: .build/darwin-x64-app + + - name: Download arm64 App + uses: actions/download-artifact@v3 + with: + name: void-darwin-arm64-rawapp + path: .build/darwin-arm64-app + + - name: Create Universal App working dir + run: | + mkdir -p .build/darwin-universal/{x64,arm64,universal} + + - name: Extract Apps + run: | + unzip -o .build/darwin-x64-app/Void-RawApp-darwin-x64.zip -d .build/darwin-universal/x64 + unzip -o .build/darwin-arm64-app/Void-RawApp-darwin-arm64.zip -d .build/darwin-universal/arm64 + + - name: Create Universal App + run: | + # Script to create universal binary + cd build/darwin + node create-universal-app.js \ + "$(pwd)/../../.build/darwin-universal/arm64/Void.app" \ + "$(pwd)/../../.build/darwin-universal/x64/Void.app" \ + "$(pwd)/../../.build/darwin-universal/universal/Void.app" + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Install create-dmg + run: npm install -g create-dmg + + - name: Create Universal DMG + run: | + cd .build/darwin-universal/universal + create-dmg --volname "Void Installer" Void.app . || true + GENERATED_DMG=$(ls *.dmg) + mv "${GENERATED_DMG}" "../../Void-Installer-darwin-universal.dmg" + cd ../.. + shasum -a 256 Void-Installer-darwin-universal.dmg > Void-Installer-darwin-universal.dmg.sha256 + + - name: Upload Universal DMG + uses: actions/upload-artifact@v4 + with: + name: void-darwin-universal + path: | + .build/Void-Installer-darwin-universal.dmg + .build/Void-Installer-darwin-universal.dmg.sha256 + + create-release: + needs: [build-linux, build-linux-arm64, build-windows, build-windows-arm64, build-macos, create-universal-macos] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Download all artifacts + uses: actions/download-artifact@v3 + with: + path: release-artifacts + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + files: | + release-artifacts/void-linux-x64/void-linux-x64.tar.gz + release-artifacts/void-linux-x64/void-linux-x64.tar.gz.sha256 + release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz + release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz.sha256 + release-artifacts/void-win32-x64/void-win32-x64.zip + release-artifacts/void-win32-x64/void-win32-x64.zip.sha256 + release-artifacts/void-win32-arm64/void-win32-arm64.zip + release-artifacts/void-win32-arm64/void-win32-arm64.zip.sha256 + release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg + release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg.sha256 + release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg + release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg.sha256 + release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg + release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg.sha256 draft: true - files: dist/**/* + generate_release_notes: true From 4798bbdc86ea1ae14347156a8ff880a6f2bc52d1 Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Sun, 23 Mar 2025 22:03:26 -0700 Subject: [PATCH 22/54] prompt --- src/vs/workbench/contrib/void/common/prompt/prompts.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/void/common/prompt/prompts.ts b/src/vs/workbench/contrib/void/common/prompt/prompts.ts index 13ea2eb3..dbe123f5 100644 --- a/src/vs/workbench/contrib/void/common/prompt/prompts.ts +++ b/src/vs/workbench/contrib/void/common/prompt/prompts.ts @@ -146,7 +146,7 @@ Here's an example of a good description:\n${editToolDescription}.` export const chat_systemMessage = (workspaces: string[], runningTerminalIds: string[], mode: ChatMode) => `\ You are an expert coding ${mode === 'agent' ? 'agent' : 'assistant'} that runs in the Void code editor. Your job is \ -${mode === 'agent' ? `to help the user develop, run, deploy, and make changes to their codebase. You should ALWAYS bring user's task to completion to the fullest extent possible, calling tools to make all necessary changes. Do not be lazy.` +${mode === 'agent' ? `to help the user develop, run, deploy, and make changes to their codebase. You should ALWAYS bring user's task to completion to the fullest extent possible, calling tools to make all necessary changes.` : mode === 'gather' ? `to search and understand the user's codebase. You MUST use tools to read files and help the user understand the codebase, even if you were initially given files.` : mode === 'normal' ? `to assist the user with their coding tasks.` : ''} @@ -163,7 +163,9 @@ ${/* tool use */ mode === 'agent' || mode === 'gather' ? `\ You will be given tools you can call. ${mode === 'agent' ? `\ - Only use tools if they help you accomplish the user's goal. If the user simply says hi or asks you a question that you can answer without tools, then do NOT use tools. -- ALWAYS use tools to take actions. For example, if you would like to edit a file, you MUST use a tool.` +- ALWAYS use tools to take actions. For example, if you would like to edit a file, you MUST use a tool. +- You will OFTEN need to gather context before making a change. Do not immediately make a change unless you have ALL relevant context. +- ALWAYS have maximal certainty in a change BEFORE you make it. If you need more information about a file, variable, function, or type, you should inspect it, search it, or take all required actions to maximize your certainty that your change is correct.` : mode === 'gather' ? `\ - Your primary use of tools should be to gather information to help the user understand the codebase and answer their query. - You should extensively read files, types, etc and gather relevant context.` From 32bee63b503c468c3b89e00b9668ec191936fc4e Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Sun, 23 Mar 2025 22:26:09 -0700 Subject: [PATCH 23/54] fix prompting that made void use pathname_search over regular search --- src/vs/workbench/contrib/void/browser/aiRegexService.ts | 4 ++-- .../workbench/contrib/void/browser/chatThreadService.ts | 8 ++++---- .../void/browser/react/src/sidebar-tsx/SidebarChat.tsx | 8 ++++---- src/vs/workbench/contrib/void/browser/toolsService.ts | 6 +++--- src/vs/workbench/contrib/void/common/prompt/prompts.ts | 8 ++++---- src/vs/workbench/contrib/void/common/toolsServiceTypes.ts | 4 ++-- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/aiRegexService.ts b/src/vs/workbench/contrib/void/browser/aiRegexService.ts index f8b15e56..4e37f99c 100644 --- a/src/vs/workbench/contrib/void/browser/aiRegexService.ts +++ b/src/vs/workbench/contrib/void/browser/aiRegexService.ts @@ -34,7 +34,7 @@ // // const result = await new Promise((res, rej) => { // // sendLLMMessage({ // // messages, -// // tools: ['semantic_search'], +// // tools: ['grep_search'], // // onFinalMessage: ({ result: r, }) => { // // res(r) // // }, @@ -73,7 +73,7 @@ // // const result = new Promise((res, rej) => { // // sendLLMMessage({ // // messages, -// // tools: ['semantic_search'], +// // tools: ['grep_search'], // // onResult: (r) => { // // res(r) // // } diff --git a/src/vs/workbench/contrib/void/browser/chatThreadService.ts b/src/vs/workbench/contrib/void/browser/chatThreadService.ts index 90299f02..ca2f6369 100644 --- a/src/vs/workbench/contrib/void/browser/chatThreadService.ts +++ b/src/vs/workbench/contrib/void/browser/chatThreadService.ts @@ -392,7 +392,7 @@ class ChatThreadService extends Disposable implements IChatThreadService { { role: 'tool', - name: 'semantic_search', + name: 'grep_search', id: 'tool-4', paramsStr: '{"query": "function main"}', content: 'Found matches in 3 files', @@ -408,15 +408,15 @@ class ChatThreadService extends Disposable implements IChatThreadService { hasNextPage: false } }, - } satisfies ToolMessage<'semantic_search'>, + } satisfies ToolMessage<'grep_search'>, // { // role: 'tool_request', - // name: 'semantic_search', + // name: 'grep_search', // params: { queryStr: 'function main', pageNumber: 0 }, // paramsStr: '{"query": "function main"}', // id: 'request-4', - // } satisfies ToolRequestApproval<'semantic_search'>, + // } satisfies ToolRequestApproval<'grep_search'>, // --- diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index b99dd266..18a40ac7 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -1178,7 +1178,7 @@ const titleOfToolName = { 'read_file': { done: 'Read file', proposed: 'Read file', running: loadingTitleWrapper('Reading file') }, 'list_dir': { done: 'Inspected folder', proposed: 'Inspect folder', running: loadingTitleWrapper('Inspecting folder') }, 'pathname_search': { done: 'Searched by file name', proposed: 'Search by file name', running: loadingTitleWrapper('Searching by file name') }, - 'semantic_search': { done: 'Semantic searched', proposed: 'Semantic search', running: loadingTitleWrapper('Searching') }, + 'grep_search': { done: 'Searched', proposed: 'Search', running: loadingTitleWrapper('Searching') }, 'create_uri': { done: (isFolder: boolean) => `Created ${folderFileStr(isFolder)}`, proposed: (isFolder: boolean | null) => isFolder === null ? 'Create URI' : `Create ${folderFileStr(isFolder)}`, @@ -1210,8 +1210,8 @@ const toolNameToDesc = (toolName: ToolName, _toolParams: ToolCallParams[ToolName } else if (toolName === 'pathname_search') { const toolParams = _toolParams as ToolCallParams['pathname_search'] return `"${toolParams.queryStr}"`; - } else if (toolName === 'semantic_search') { - const toolParams = _toolParams as ToolCallParams['semantic_search'] + } else if (toolName === 'grep_search') { + const toolParams = _toolParams as ToolCallParams['grep_search'] return `"${toolParams.queryStr}"`; } else if (toolName === 'create_uri') { const toolParams = _toolParams as ToolCallParams['create_uri'] @@ -1490,7 +1490,7 @@ const toolNameToComponent: { [T in ToolName]: ToolComponent } = { return } }, - 'semantic_search': { + 'grep_search': { requestWrapper: null, resultWrapper: ({ toolMessage }) => { const accessor = useAccessor() diff --git a/src/vs/workbench/contrib/void/browser/toolsService.ts b/src/vs/workbench/contrib/void/browser/toolsService.ts index 7c693d0c..ad773cd0 100644 --- a/src/vs/workbench/contrib/void/browser/toolsService.ts +++ b/src/vs/workbench/contrib/void/browser/toolsService.ts @@ -227,7 +227,7 @@ export class ToolsService implements IToolsService { return { queryStr, pageNumber } }, - semantic_search: async (params: string) => { + grep_search: async (params: string) => { const o = validateJSON(params) const { query: queryUnknown, pageNumber: pageNumberUnknown } = o @@ -314,7 +314,7 @@ export class ToolsService implements IToolsService { return { result: { uris, hasNextPage } } }, - semantic_search: async ({ queryStr, pageNumber }) => { + grep_search: async ({ queryStr, pageNumber }) => { const query = queryBuilder.text({ pattern: queryStr, isRegExp: true, @@ -388,7 +388,7 @@ export class ToolsService implements IToolsService { pathname_search: (params, result) => { return result.uris.map(uri => uri.fsPath).join('\n') + nextPageStr(result.hasNextPage) }, - semantic_search: (params, result) => { + grep_search: (params, result) => { return result.uris.map(uri => uri.fsPath).join('\n') + nextPageStr(result.hasNextPage) }, // --- diff --git a/src/vs/workbench/contrib/void/common/prompt/prompts.ts b/src/vs/workbench/contrib/void/common/prompt/prompts.ts index dbe123f5..29ac971a 100644 --- a/src/vs/workbench/contrib/void/common/prompt/prompts.ts +++ b/src/vs/workbench/contrib/void/common/prompt/prompts.ts @@ -69,16 +69,16 @@ export const voidTools = { pathname_search: { name: 'pathname_search', - description: `Returns all pathnames that match a given grep query. You should use this when looking for a file with a specific name or path. This does NOT search file content. ${paginationHelper.desc}`, + description: `Returns all pathnames that match a given \`find\`-style query (searches ONLY file names). You should use this when looking for a file with a specific name or path. ${paginationHelper.desc}`, params: { query: { type: 'string', description: undefined }, ...paginationHelper.param, }, }, - semantic_search: { - name: 'semantic_search', - description: `Returns pathnames of files with an exact match of the query. The query can be any regex. This does NOT search pathname. As a follow-up, you may want to use read_file to view the full file contents of the results. ${paginationHelper.desc}`, + grep_search: { + name: 'grep_search', + description: `Returns all pathnames that match a given \`grep\`-style query (searches ONLY file contents). The query can be any regex. This is often followed by the \`read_file\` tool to view the full file contents of results. ${paginationHelper.desc}`, params: { query: { type: 'string', description: undefined }, ...paginationHelper.param, diff --git a/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts b/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts index e7315718..90d34311 100644 --- a/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts +++ b/src/vs/workbench/contrib/void/common/toolsServiceTypes.ts @@ -44,7 +44,7 @@ export type ToolCallParams = { 'read_file': { uri: URI, pageNumber: number }, 'list_dir': { rootURI: URI, pageNumber: number }, 'pathname_search': { queryStr: string, pageNumber: number }, - 'semantic_search': { queryStr: string, pageNumber: number }, + 'grep_search': { queryStr: string, pageNumber: number }, // --- 'edit': { uri: URI, changeDescription: string }, 'create_uri': { uri: URI, isFolder: boolean }, @@ -57,7 +57,7 @@ export type ToolResultType = { 'read_file': { fileContents: string, hasNextPage: boolean }, 'list_dir': { children: ToolDirectoryItem[] | null, hasNextPage: boolean, hasPrevPage: boolean, itemsRemaining: number }, 'pathname_search': { uris: URI[], hasNextPage: boolean }, - 'semantic_search': { uris: URI[], hasNextPage: boolean }, + 'grep_search': { uris: URI[], hasNextPage: boolean }, // --- 'edit': Promise, 'create_uri': {}, From 1def205b2890459bab88cfea1cbb636dc400c67f Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 22:28:59 -0700 Subject: [PATCH 24/54] test2 --- .github/workflows/build.yml | 65 ++++++++++++++++++++++++++----------- 1 file changed, 46 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67eb6119..31048fb2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,6 @@ jobs: path: | .build/linux/client/void-linux-x64.tar.gz .build/linux/client/void-linux-x64.tar.gz.sha256 - build-linux-arm64: runs-on: ubuntu-latest steps: @@ -204,20 +203,62 @@ jobs: npm install npm install -g node-gyp npm install -g gulp-cli - npm install -g create-dmg - name: Build run: | npm run buildreact npm run gulp vscode-darwin-${{ matrix.arch }}-min + - name: Create Raw App Archive + run: | + mkdir -p "$(pwd)/.build/darwin-${{ matrix.arch }}" + cd "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" + ditto -c -k --sequesterRsrc --keepParent "Void.app" "$(pwd)/../void/.build/darwin-${{ matrix.arch }}/Void-RawApp-darwin-${{ matrix.arch }}.zip" + + - name: Upload Raw App + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-unsigned + path: | + .build/darwin-${{ matrix.arch }}/Void-RawApp-darwin-${{ matrix.arch }}.zip + + sign-notarize-macos: + needs: build-macos + runs-on: macos-latest + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + strategy: + matrix: + arch: [arm64, x64] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install create-dmg + run: npm install -g create-dmg + + - name: Download unsigned app + uses: actions/download-artifact@v3 + with: + name: void-darwin-${{ matrix.arch }}-unsigned + path: .build/darwin-${{ matrix.arch }}-unsigned + - name: Create temporary working directory run: | WORKING_DIR="${{ runner.temp }}/VoidSign-${{ matrix.arch }}" KEYCHAIN_DIR="${WORKING_DIR}/1_Keychain" SIGN_DIR="${WORKING_DIR}/2_Signed" mkdir -p "${WORKING_DIR}" "${KEYCHAIN_DIR}" "${SIGN_DIR}" - cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + mkdir -p "${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" + + # Extract the app + unzip -o ".build/darwin-${{ matrix.arch }}-unsigned/Void-RawApp-darwin-${{ matrix.arch }}.zip" -d "${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" + echo "WORKING_DIR=${WORKING_DIR}" >> $GITHUB_ENV echo "KEYCHAIN_DIR=${KEYCHAIN_DIR}" >> $GITHUB_ENV echo "SIGN_DIR=${SIGN_DIR}" >> $GITHUB_ENV @@ -225,7 +266,6 @@ jobs: echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - name: Import certificate - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} env: P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} @@ -248,7 +288,6 @@ jobs: security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) - name: Sign Application - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} env: CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} VSCODE_ARCH: ${{ matrix.arch }} @@ -258,28 +297,16 @@ jobs: node sign.js "${SIGN_DIR}" codesign --verify --verbose=4 "${SIGNED_DOTAPP}" - - name: Create Unsigned App (for PR builds) - if: ${{ github.event_name == 'pull_request' || github.repository != 'voideditor/void' }} - run: | - cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" - echo "SIGNED_DOTAPP_DIR=$(pwd)/../VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP=$(pwd)/../VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - - name: Create DMG run: | cd "${SIGNED_DOTAPP_DIR}" npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . || true GENERATED_DMG=$(ls *.dmg) mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" - - if [[ "${{ github.event_name }}" != "pull_request" && "${{ github.repository }}" == "voideditor/void" ]]; then - codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" - fi - + codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV - name: Notarize - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} env: APPLE_ID: ${{ secrets.APPLE_ID }} TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} @@ -349,7 +376,7 @@ jobs: path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json create-universal-macos: - needs: build-macos + needs: sign-notarize-macos runs-on: macos-latest if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} steps: From a38b4c8ee056e777fffe954855e2ee03458936aa Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 22:44:06 -0700 Subject: [PATCH 25/54] revert to 3.7 again --- .github/workflows/build.yml | 65 +++++++++++-------------------------- 1 file changed, 19 insertions(+), 46 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31048fb2..67eb6119 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,6 +51,7 @@ jobs: path: | .build/linux/client/void-linux-x64.tar.gz .build/linux/client/void-linux-x64.tar.gz.sha256 + build-linux-arm64: runs-on: ubuntu-latest steps: @@ -203,62 +204,20 @@ jobs: npm install npm install -g node-gyp npm install -g gulp-cli + npm install -g create-dmg - name: Build run: | npm run buildreact npm run gulp vscode-darwin-${{ matrix.arch }}-min - - name: Create Raw App Archive - run: | - mkdir -p "$(pwd)/.build/darwin-${{ matrix.arch }}" - cd "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" - ditto -c -k --sequesterRsrc --keepParent "Void.app" "$(pwd)/../void/.build/darwin-${{ matrix.arch }}/Void-RawApp-darwin-${{ matrix.arch }}.zip" - - - name: Upload Raw App - uses: actions/upload-artifact@v4 - with: - name: void-darwin-${{ matrix.arch }}-unsigned - path: | - .build/darwin-${{ matrix.arch }}/Void-RawApp-darwin-${{ matrix.arch }}.zip - - sign-notarize-macos: - needs: build-macos - runs-on: macos-latest - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} - strategy: - matrix: - arch: [arm64, x64] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install create-dmg - run: npm install -g create-dmg - - - name: Download unsigned app - uses: actions/download-artifact@v3 - with: - name: void-darwin-${{ matrix.arch }}-unsigned - path: .build/darwin-${{ matrix.arch }}-unsigned - - name: Create temporary working directory run: | WORKING_DIR="${{ runner.temp }}/VoidSign-${{ matrix.arch }}" KEYCHAIN_DIR="${WORKING_DIR}/1_Keychain" SIGN_DIR="${WORKING_DIR}/2_Signed" mkdir -p "${WORKING_DIR}" "${KEYCHAIN_DIR}" "${SIGN_DIR}" - mkdir -p "${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" - - # Extract the app - unzip -o ".build/darwin-${{ matrix.arch }}-unsigned/Void-RawApp-darwin-${{ matrix.arch }}.zip" -d "${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" - + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" echo "WORKING_DIR=${WORKING_DIR}" >> $GITHUB_ENV echo "KEYCHAIN_DIR=${KEYCHAIN_DIR}" >> $GITHUB_ENV echo "SIGN_DIR=${SIGN_DIR}" >> $GITHUB_ENV @@ -266,6 +225,7 @@ jobs: echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - name: Import certificate + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} env: P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} @@ -288,6 +248,7 @@ jobs: security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) - name: Sign Application + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} env: CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} VSCODE_ARCH: ${{ matrix.arch }} @@ -297,16 +258,28 @@ jobs: node sign.js "${SIGN_DIR}" codesign --verify --verbose=4 "${SIGNED_DOTAPP}" + - name: Create Unsigned App (for PR builds) + if: ${{ github.event_name == 'pull_request' || github.repository != 'voideditor/void' }} + run: | + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + echo "SIGNED_DOTAPP_DIR=$(pwd)/../VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP=$(pwd)/../VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV + - name: Create DMG run: | cd "${SIGNED_DOTAPP_DIR}" npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . || true GENERATED_DMG=$(ls *.dmg) mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" - codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" + + if [[ "${{ github.event_name }}" != "pull_request" && "${{ github.repository }}" == "voideditor/void" ]]; then + codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" + fi + echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV - name: Notarize + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} env: APPLE_ID: ${{ secrets.APPLE_ID }} TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} @@ -376,7 +349,7 @@ jobs: path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json create-universal-macos: - needs: sign-notarize-macos + needs: build-macos runs-on: macos-latest if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} steps: From 1f98e75a4f6bb1cce031fc4281a68fc7e3cd422d Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Sun, 23 Mar 2025 22:46:25 -0700 Subject: [PATCH 26/54] terminal better --- .../react/src/sidebar-tsx/SidebarChat.tsx | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index 18a40ac7..088ba708 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -740,7 +740,7 @@ const ToolHeaderWrapper = ({ } {numResults !== undefined && ( - {`(${numResults}${hasNextPage ? '+' : ''} result${numResults !== 1 ? 's' : ''})`} + {`${numResults}${hasNextPage ? '+' : ''} result${numResults !== 1 ? 's' : ''}`} )} {isError && } @@ -751,7 +751,7 @@ const ToolHeaderWrapper = ({ {/* children */} {
@@ -1310,7 +1310,7 @@ const ToolRequestAcceptRejectButtons = () => { } export const ToolChildrenWrapper = ({ children, className }: { children: React.ReactNode, className?: string }) => { - return
+ return
{children}
@@ -1764,16 +1764,18 @@ const toolNameToComponent: { [T in ToolName]: ToolComponent } = { : null componentParams.children = - terminalToolsService.openTerminal(terminalId)} - /> +
- {resolveReason.type === 'bgtask' ? 'Result so far:\n' : null} - {result} - {resultStr} +
+ {`Ran command: `} + {command} +
+
+ {resolveReason.type === 'bgtask' ? 'Result so far:\n' : null} + {`Result: `} + {result} + {resultStr} +
From 090eaba3aa7615e8c69898f31ec2f18d2ddb3350 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 23:07:14 -0700 Subject: [PATCH 27/54] test 3 --- .github/workflows/build.yml | 596 ++++++++++++++---------------------- 1 file changed, 224 insertions(+), 372 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67eb6119..ed1319be 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,455 +1,307 @@ -name: Build Void +name: Build VSCode on: push: - branches: [ main, release/*, github-workflow ] + branches: [ main, github-workflow ] pull_request: branches: [ main ] workflow_dispatch: + inputs: + version: + description: 'Version to build (e.g., 1.99.0)' + required: true + default: '' + quality: + description: 'Quality level (stable, insider)' + required: true + default: 'insider' + type: choice + options: + - stable + - insider + +env: + VSCODE_ARCH_WINDOWS: "x64" + VSCODE_ARCH_MACOS: "x64,arm64" + VSCODE_ARCH_LINUX: "x64,armhf,arm64" + VSCODE_QUALITY: ${{ github.event.inputs.quality || 'insider' }} + VSCODE_BUILD_VERSION: ${{ github.event.inputs.version || '1.99.0' }} jobs: - build-linux: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-linux-x64-min - - - name: Package - run: | - mkdir -p .build/linux/client - ARCHIVE_PATH=".build/linux/client/void-linux-x64.tar.gz" - tar -czf $ARCHIVE_PATH -C .. VSCode-linux-x64 - - - name: Generate checksum - run: | - cd .build/linux/client - sha256sum void-linux-x64.tar.gz > void-linux-x64.tar.gz.sha256 - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-linux-x64 - path: | - .build/linux/client/void-linux-x64.tar.gz - .build/linux/client/void-linux-x64.tar.gz.sha256 - - build-linux-arm64: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-linux-arm64-min - - - name: Package - run: | - mkdir -p .build/linux/client - ARCHIVE_PATH=".build/linux/client/void-linux-arm64.tar.gz" - tar -czf $ARCHIVE_PATH -C .. VSCode-linux-arm64 - - - name: Generate checksum - run: | - cd .build/linux/client - sha256sum void-linux-arm64.tar.gz > void-linux-arm64.tar.gz.sha256 - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-linux-arm64 - path: | - .build/linux/client/void-linux-arm64.tar.gz - .build/linux/client/void-linux-arm64.tar.gz.sha256 - build-windows: + name: Windows (${{ matrix.arch }}) runs-on: windows-latest + strategy: + matrix: + arch: [x64, arm64] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + fetch-depth: 1 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'npm' + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install dependencies run: | - npm install - npm install -g node-gyp - npm install -g gulp-cli + npm ci + env: + npm_config_arch: ${{ matrix.arch }} - - name: Build + - name: Build VSCode run: | - npm run buildreact - npm run gulp vscode-win32-x64-min + npm run gulp -- "vscode-win32-${{ matrix.arch }}-min" + npm run gulp -- "vscode-win32-${{ matrix.arch }}-inno-updater" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Package + - name: Sign binaries (if credentials available) + if: false # TODO!!! fill this in - Replace with your condition for when signing is available run: | - mkdir -p .build/win32-x64 - Compress-Archive -Path ..\VSCode-win32-x64\* -DestinationPath .build\win32-x64\void-win32-x64.zip - shell: pwsh + # Implementation would depend on your signing mechanism + # For example, using signtool.exe or an external signing service + # This is where you would sign the .exe, .dll, and .node files - - name: Generate checksum + - name: Create packages run: | - cd .build/win32-x64 - $hash = Get-FileHash -Algorithm SHA256 void-win32-x64.zip - $hash.Hash | Out-File -Encoding ascii void-win32-x64.zip.sha256 + $Version = "${{ env.VSCODE_BUILD_VERSION }}" + $ArchivePath = ".build\win32-${{ matrix.arch }}\VSCode-win32-${{ matrix.arch }}-$Version.zip" + New-Item -ItemType Directory -Path .build\win32-${{ matrix.arch }} -Force + 7z.exe a -tzip $ArchivePath -x!CodeSignSummary*.md ..\VSCode-win32-${{ matrix.arch }}\* -r + + # Build installers + npm run gulp -- "vscode-win32-${{ matrix.arch }}-system-setup" + npm run gulp -- "vscode-win32-${{ matrix.arch }}-user-setup" + + # Rename setup files + mv .build\win32-${{ matrix.arch }}\system-setup\VSCodeSetup.exe .build\win32-${{ matrix.arch }}\VSCodeSetup-${{ matrix.arch }}-$Version.exe + mv .build\win32-${{ matrix.arch }}\user-setup\VSCodeSetup.exe .build\win32-${{ matrix.arch }}\VSCodeUserSetup-${{ matrix.arch }}-$Version.exe shell: pwsh - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: void-win32-x64 + name: vscode-win32-${{ matrix.arch }} path: | - .build/win32-x64/void-win32-x64.zip - .build/win32-x64/void-win32-x64.zip.sha256 - - build-windows-arm64: - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-win32-arm64-min - - - name: Package - run: | - mkdir -p .build/win32-arm64 - Compress-Archive -Path ..\VSCode-win32-arm64\* -DestinationPath .build\win32-arm64\void-win32-arm64.zip - shell: pwsh - - - name: Generate checksum - run: | - cd .build/win32-arm64 - $hash = Get-FileHash -Algorithm SHA256 void-win32-arm64.zip - $hash.Hash | Out-File -Encoding ascii void-win32-arm64.zip.sha256 - shell: pwsh - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-win32-arm64 - path: | - .build/win32-arm64/void-win32-arm64.zip - .build/win32-arm64/void-win32-arm64.zip.sha256 + .build/win32-${{ matrix.arch }}/*.zip + .build/win32-${{ matrix.arch }}/*.exe + retention-days: 7 build-macos: + name: macOS (${{ matrix.arch }}) runs-on: macos-latest strategy: matrix: - arch: [arm64, x64] + arch: [x64, arm64] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + fetch-depth: 1 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' cache: 'npm' - name: Install dependencies - run: | - npm install - npm install -g node-gyp - npm install -g gulp-cli - npm install -g create-dmg + run: npm ci - - name: Build + - name: Build VSCode run: | - npm run buildreact - npm run gulp vscode-darwin-${{ matrix.arch }}-min - - - name: Create temporary working directory - run: | - WORKING_DIR="${{ runner.temp }}/VoidSign-${{ matrix.arch }}" - KEYCHAIN_DIR="${WORKING_DIR}/1_Keychain" - SIGN_DIR="${WORKING_DIR}/2_Signed" - mkdir -p "${WORKING_DIR}" "${KEYCHAIN_DIR}" "${SIGN_DIR}" - cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" - echo "WORKING_DIR=${WORKING_DIR}" >> $GITHUB_ENV - echo "KEYCHAIN_DIR=${KEYCHAIN_DIR}" >> $GITHUB_ENV - echo "SIGN_DIR=${SIGN_DIR}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP_DIR=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - - - name: Import certificate - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + npm run gulp -- "vscode-darwin-${{ matrix.arch }}-min" env: - P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} - P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} - KEYCHAIN_PASSWORD: "temporary-password" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Package app run: | - KEYCHAIN="${KEYCHAIN_DIR}/buildagent.keychain" - echo "KEYCHAIN=${KEYCHAIN}" >> $GITHUB_ENV + VERSION="${{ env.VSCODE_BUILD_VERSION }}" + ARTIFACT_NAME="VSCode-darwin-${{ matrix.arch }}" - # Create a new keychain - security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" - security set-keychain-settings -lut 21600 "${KEYCHAIN}" - security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" + # Create .zip archive + PACKAGE_PATH=".build/darwin-${{ matrix.arch }}/${ARTIFACT_NAME}-${VERSION}.zip" + mkdir -p .build/darwin-${{ matrix.arch }} + (cd .. && zip -r -X -y "${GITHUB_WORKSPACE}/${PACKAGE_PATH}" "${ARTIFACT_NAME}.app") - # Import certificate - echo "${P12_BASE64}" | base64 --decode > "${KEYCHAIN_DIR}/certificate.p12" - security import "${KEYCHAIN_DIR}/certificate.p12" -k "${KEYCHAIN}" -P "${P12_PASSWORD}" -T /usr/bin/codesign - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" > /dev/null - - # Add to keychain list - security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) - - - name: Sign Application - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} - env: - CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} - VSCODE_ARCH: ${{ matrix.arch }} + - name: Sign app (if credentials available) + if: false # TODO!!! - add signing here - Replace with your condition for when signing is available run: | - export AGENT_TEMPDIRECTORY="${KEYCHAIN_DIR}" - cd $(pwd)/build/darwin - node sign.js "${SIGN_DIR}" - codesign --verify --verbose=4 "${SIGNED_DOTAPP}" + # Implementation would depend on your signing certificates + # For example: + # ./build/darwin/sign.sh - - name: Create Unsigned App (for PR builds) - if: ${{ github.event_name == 'pull_request' || github.repository != 'voideditor/void' }} - run: | - cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" - echo "SIGNED_DOTAPP_DIR=$(pwd)/../VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP=$(pwd)/../VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - - - name: Create DMG - run: | - cd "${SIGNED_DOTAPP_DIR}" - npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . || true - GENERATED_DMG=$(ls *.dmg) - mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" - - if [[ "${{ github.event_name }}" != "pull_request" && "${{ github.repository }}" == "voideditor/void" ]]; then - codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" - fi - - echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV - - - name: Notarize - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} - env: - APPLE_ID: ${{ secrets.APPLE_ID }} - TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - APP_PASSWORD: ${{ secrets.APPLE_APP_PWD }} - KEYCHAIN_PASSWORD: "temporary-password" - run: | - # Store credentials for notarization - xcrun notarytool store-credentials "Void" \ - --apple-id "${APPLE_ID}" \ - --team-id "${TEAM_ID}" \ - --password "${APP_PASSWORD}" \ - --keychain "${KEYCHAIN}" - - # Submit for notarization with a timeout - xcrun notarytool submit "${SIGNED_DMG}" \ - --keychain-profile "Void" \ - --keychain "${KEYCHAIN}" \ - --wait --timeout 2h - - # Staple the notarization ticket - xcrun stapler staple "${SIGNED_DMG}" - - - name: Create Raw App Archive - run: | - cd "${SIGNED_DOTAPP_DIR}" - VOIDAPP=$(basename "${SIGNED_DOTAPP}") - ditto -c -k --sequesterRsrc --keepParent "${VOIDAPP}" "Void-RawApp-darwin-${{ matrix.arch }}.zip" - - - name: Generate Hash File - run: | - cd "${SIGNED_DOTAPP_DIR}" - SHA1=$(shasum -a 1 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) - SHA256=$(shasum -a 256 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) - TIMESTAMP=$(date +%s) - - cat > "Void-UpdJSON-darwin-${{ matrix.arch }}.json" << EOF - { - "sha256hash": "${SHA256}", - "hash": "${SHA1}", - "timestamp": ${TIMESTAMP} - } - EOF - - - name: Generate checksum for DMG - run: | - cd "${SIGNED_DOTAPP_DIR}" - shasum -a 256 "Void-Installer-darwin-${{ matrix.arch }}.dmg" > "Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256" - - - name: Upload DMG + - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: void-darwin-${{ matrix.arch }}-dmg - path: | - ${{ env.SIGNED_DMG }} - ${{ env.SIGNED_DOTAPP_DIR }}/Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256 + name: vscode-darwin-${{ matrix.arch }} + path: .build/darwin-${{ matrix.arch }}/*.zip + retention-days: 7 - - name: Upload Raw App - uses: actions/upload-artifact@v4 - with: - name: void-darwin-${{ matrix.arch }}-rawapp - path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-RawApp-darwin-${{ matrix.arch }}.zip - - - name: Upload Hash File - uses: actions/upload-artifact@v4 - with: - name: void-darwin-${{ matrix.arch }}-hash - path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json - - create-universal-macos: - needs: build-macos + build-universal-macos: + name: macOS (Universal) + needs: [build-macos] runs-on: macos-latest - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + if: ${{ contains(env.VSCODE_ARCH_MACOS, 'x64') && contains(env.VSCODE_ARCH_MACOS, 'arm64') }} steps: - name: Checkout - uses: actions/checkout@v3 - - - name: Download x64 DMG - uses: actions/download-artifact@v3 + uses: actions/checkout@v4 with: - name: void-darwin-x64-dmg - path: .build/darwin-x64 - - - name: Download arm64 DMG - uses: actions/download-artifact@v3 - with: - name: void-darwin-arm64-dmg - path: .build/darwin-arm64 - - - name: Download x64 App - uses: actions/download-artifact@v3 - with: - name: void-darwin-x64-rawapp - path: .build/darwin-x64-app - - - name: Download arm64 App - uses: actions/download-artifact@v3 - with: - name: void-darwin-arm64-rawapp - path: .build/darwin-arm64-app - - - name: Create Universal App working dir - run: | - mkdir -p .build/darwin-universal/{x64,arm64,universal} - - - name: Extract Apps - run: | - unzip -o .build/darwin-x64-app/Void-RawApp-darwin-x64.zip -d .build/darwin-universal/x64 - unzip -o .build/darwin-arm64-app/Void-RawApp-darwin-arm64.zip -d .build/darwin-universal/arm64 - - - name: Create Universal App - run: | - # Script to create universal binary - cd build/darwin - node create-universal-app.js \ - "$(pwd)/../../.build/darwin-universal/arm64/Void.app" \ - "$(pwd)/../../.build/darwin-universal/x64/Void.app" \ - "$(pwd)/../../.build/darwin-universal/universal/Void.app" + fetch-depth: 1 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version-file: '.nvmrc' + cache: 'npm' - - name: Install create-dmg - run: npm install -g create-dmg + - name: Download x64 build + uses: actions/download-artifact@v4 + with: + name: vscode-darwin-x64 + path: .build/darwin-x64 - - name: Create Universal DMG + - name: Download arm64 build + uses: actions/download-artifact@v4 + with: + name: vscode-darwin-arm64 + path: .build/darwin-arm64 + + - name: Create Universal build run: | - cd .build/darwin-universal/universal - create-dmg --volname "Void Installer" Void.app . || true - GENERATED_DMG=$(ls *.dmg) - mv "${GENERATED_DMG}" "../../Void-Installer-darwin-universal.dmg" - cd ../.. - shasum -a 256 Void-Installer-darwin-universal.dmg > Void-Installer-darwin-universal.dmg.sha256 + VERSION="${{ env.VSCODE_BUILD_VERSION }}" - - name: Upload Universal DMG + # Extract both architectures + mkdir -p .build/darwin-universal + unzip -q .build/darwin-x64/VSCode-darwin-x64-${VERSION}.zip -d .build/darwin-x64 + unzip -q .build/darwin-arm64/VSCode-darwin-arm64-${VERSION}.zip -d .build/darwin-arm64 + + # Create universal app + node build/darwin/create-universal-app.js \ + .build/darwin-x64/VSCode-darwin-x64.app \ + .build/darwin-arm64/VSCode-darwin-arm64.app \ + .build/darwin-universal/VSCode-darwin-universal.app + + # Package universal app + (cd .build/darwin-universal && zip -r -X -y VSCode-darwin-universal-${VERSION}.zip VSCode-darwin-universal.app) + + - name: Upload Universal Build uses: actions/upload-artifact@v4 with: - name: void-darwin-universal + name: vscode-darwin-universal + path: .build/darwin-universal/*.zip + retention-days: 7 + + build-linux: + name: Linux (${{ matrix.arch }}) + runs-on: ubuntu-latest + strategy: + matrix: + arch: [x64, armhf, arm64] + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies and tools + run: | + npm ci + sudo apt-get update + sudo apt-get install -y fakeroot dpkg rpm + + - name: Build VSCode + run: | + npm run gulp -- "vscode-linux-${{ matrix.arch }}-min" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create packages (tarball) + run: | + VERSION="${{ env.VSCODE_BUILD_VERSION }}" + PACKAGE_PATH=".build/linux-${{ matrix.arch }}/archive" + TARBALL_NAME="code-${{ env.VSCODE_QUALITY }}-${{ matrix.arch }}-$VERSION.tar.gz" + + mkdir -p "$PACKAGE_PATH" + tar -czf "$PACKAGE_PATH/$TARBALL_NAME" -C .. VSCode-linux-${{ matrix.arch }} + + - name: Create DEB package + run: | + npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-deb" + npm run gulp -- "vscode-linux-${{ matrix.arch }}-build-deb" + + - name: Create RPM package + run: | + npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-rpm" + npm run gulp -- "vscode-linux-${{ matrix.arch }}-build-rpm" + + - name: Create Snap package + if: matrix.arch == 'x64' || matrix.arch == 'arm64' + run: | + sudo snap install snapcraft --classic + npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-snap" + cd .build/linux/snap/${{ matrix.arch }}/*/ + snapcraft + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: vscode-linux-${{ matrix.arch }} path: | - .build/Void-Installer-darwin-universal.dmg - .build/Void-Installer-darwin-universal.dmg.sha256 + .build/linux-${{ matrix.arch }}/archive/*.tar.gz + .build/linux/deb/*/deb/*.deb + .build/linux/rpm/*/RPMS/*/*.rpm + .build/linux/snap/${{ matrix.arch }}/*/*.snap + retention-days: 7 create-release: - needs: [build-linux, build-linux-arm64, build-windows, build-windows-arm64, build-macos, create-universal-macos] + name: Create Release + needs: [build-windows, build-macos, build-universal-macos, build-linux] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') steps: - name: Download all artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - path: release-artifacts + path: artifacts - - name: Create GitHub Release + - name: Create Release uses: softprops/action-gh-release@v1 with: - files: | - release-artifacts/void-linux-x64/void-linux-x64.tar.gz - release-artifacts/void-linux-x64/void-linux-x64.tar.gz.sha256 - release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz - release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz.sha256 - release-artifacts/void-win32-x64/void-win32-x64.zip - release-artifacts/void-win32-x64/void-win32-x64.zip.sha256 - release-artifacts/void-win32-arm64/void-win32-arm64.zip - release-artifacts/void-win32-arm64/void-win32-arm64.zip.sha256 - release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg - release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg.sha256 - release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg - release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg.sha256 - release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg - release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg.sha256 + name: VSCode ${{ env.VSCODE_BUILD_VERSION }} draft: true - generate_release_notes: true + prerelease: ${{ env.VSCODE_QUALITY == 'insider' }} + files: | + artifacts/vscode-win32-x64/*.zip + artifacts/vscode-win32-x64/*.exe + artifacts/vscode-win32-arm64/*.zip + artifacts/vscode-win32-arm64/*.exe + artifacts/vscode-darwin-x64/*.zip + artifacts/vscode-darwin-arm64/*.zip + artifacts/vscode-darwin-universal/*.zip + artifacts/vscode-linux-x64/*.tar.gz + artifacts/vscode-linux-x64/*.deb + artifacts/vscode-linux-x64/*.rpm + artifacts/vscode-linux-x64/*.snap + artifacts/vscode-linux-arm64/*.tar.gz + artifacts/vscode-linux-arm64/*.deb + artifacts/vscode-linux-arm64/*.rpm + artifacts/vscode-linux-arm64/*.snap + artifacts/vscode-linux-armhf/*.tar.gz + artifacts/vscode-linux-armhf/*.deb + artifacts/vscode-linux-armhf/*.rpm From e2648bba3ecf718cc25a71dbd1a0c665c08f08b7 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 23:12:45 -0700 Subject: [PATCH 28/54] fix? --- .github/workflows/build.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ed1319be..00b4a305 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -147,11 +147,10 @@ jobs: path: .build/darwin-${{ matrix.arch }}/*.zip retention-days: 7 - build-universal-macos: - name: macOS (Universal) +create-release: + name: Create Universal macOS Build needs: [build-macos] runs-on: macos-latest - if: ${{ contains(env.VSCODE_ARCH_MACOS, 'x64') && contains(env.VSCODE_ARCH_MACOS, 'arm64') }} steps: - name: Checkout uses: actions/checkout@v4 From 19503d92b407757c5605aa7f88f70768be9ded06 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 23:13:47 -0700 Subject: [PATCH 29/54] fix? --- .github/workflows/build-vscode.yml | 308 +++++++++++++++++++++++++++++ 1 file changed, 308 insertions(+) create mode 100644 .github/workflows/build-vscode.yml diff --git a/.github/workflows/build-vscode.yml b/.github/workflows/build-vscode.yml new file mode 100644 index 00000000..36696417 --- /dev/null +++ b/.github/workflows/build-vscode.yml @@ -0,0 +1,308 @@ +name: Build VSCode + +on: + push: + branches: [ main ] + tags: [ 'v*' ] + pull_request: + branches: [ main ] + workflow_dispatch: + inputs: + version: + description: 'Version to build (e.g., 1.99.0)' + required: true + default: '' + quality: + description: 'Quality level (stable, insider)' + required: true + default: 'insider' + type: choice + options: + - stable + - insider + +env: + VSCODE_ARCH_WINDOWS: "x64" + VSCODE_ARCH_MACOS: "x64,arm64" + VSCODE_ARCH_LINUX: "x64,armhf,arm64" + VSCODE_QUALITY: ${{ github.event.inputs.quality || 'insider' }} + VSCODE_BUILD_VERSION: ${{ github.event.inputs.version || '1.99.0' }} + +jobs: + build-windows: + name: Windows (${{ matrix.arch }}) + runs-on: windows-latest + strategy: + matrix: + arch: [x64, arm64] + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + npm ci + env: + npm_config_arch: ${{ matrix.arch }} + + - name: Build VSCode + run: | + npm run gulp -- "vscode-win32-${{ matrix.arch }}-min" + npm run gulp -- "vscode-win32-${{ matrix.arch }}-inno-updater" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Sign binaries (if credentials available) + if: false # TODO!!! fill this in - Replace with your condition for when signing is available + run: | + # Implementation would depend on your signing mechanism + # For example, using signtool.exe or an external signing service + # This is where you would sign the .exe, .dll, and .node files + + - name: Create packages + run: | + $Version = "${{ env.VSCODE_BUILD_VERSION }}" + $ArchivePath = ".build\win32-${{ matrix.arch }}\VSCode-win32-${{ matrix.arch }}-$Version.zip" + New-Item -ItemType Directory -Path .build\win32-${{ matrix.arch }} -Force + 7z.exe a -tzip $ArchivePath -x!CodeSignSummary*.md ..\VSCode-win32-${{ matrix.arch }}\* -r + + # Build installers + npm run gulp -- "vscode-win32-${{ matrix.arch }}-system-setup" + npm run gulp -- "vscode-win32-${{ matrix.arch }}-user-setup" + + # Rename setup files + mv .build\win32-${{ matrix.arch }}\system-setup\VSCodeSetup.exe .build\win32-${{ matrix.arch }}\VSCodeSetup-${{ matrix.arch }}-$Version.exe + mv .build\win32-${{ matrix.arch }}\user-setup\VSCodeSetup.exe .build\win32-${{ matrix.arch }}\VSCodeUserSetup-${{ matrix.arch }}-$Version.exe + shell: pwsh + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: vscode-win32-${{ matrix.arch }} + path: | + .build/win32-${{ matrix.arch }}/*.zip + .build/win32-${{ matrix.arch }}/*.exe + retention-days: 7 + + build-macos: + name: macOS (${{ matrix.arch }}) + runs-on: macos-latest + strategy: + matrix: + arch: [x64, arm64] + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build VSCode + run: | + npm run gulp -- "vscode-darwin-${{ matrix.arch }}-min" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Package app + run: | + VERSION="${{ env.VSCODE_BUILD_VERSION }}" + ARTIFACT_NAME="VSCode-darwin-${{ matrix.arch }}" + + # Create .zip archive + PACKAGE_PATH=".build/darwin-${{ matrix.arch }}/${ARTIFACT_NAME}-${VERSION}.zip" + mkdir -p .build/darwin-${{ matrix.arch }} + (cd .. && zip -r -X -y "${GITHUB_WORKSPACE}/${PACKAGE_PATH}" "${ARTIFACT_NAME}.app") + + - name: Sign app (if credentials available) + if: false # TODO!!! - add signing here - Replace with your condition for when signing is available + run: | + # Implementation would depend on your signing certificates + # For example: + # ./build/darwin/sign.sh + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: vscode-darwin-${{ matrix.arch }} + path: .build/darwin-${{ matrix.arch }}/*.zip + retention-days: 7 + + build-universal-macos: + name: Create Universal macOS Build + needs: [build-macos] + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Download x64 build + uses: actions/download-artifact@v4 + with: + name: vscode-darwin-x64 + path: .build/darwin-x64 + + - name: Download arm64 build + uses: actions/download-artifact@v4 + with: + name: vscode-darwin-arm64 + path: .build/darwin-arm64 + + - name: Create Universal build + run: | + VERSION="${{ env.VSCODE_BUILD_VERSION }}" + + # Extract both architectures + mkdir -p .build/darwin-universal + unzip -q .build/darwin-x64/VSCode-darwin-x64-${VERSION}.zip -d .build/darwin-x64 + unzip -q .build/darwin-arm64/VSCode-darwin-arm64-${VERSION}.zip -d .build/darwin-arm64 + + # Create universal app + node build/darwin/create-universal-app.js \ + .build/darwin-x64/VSCode-darwin-x64.app \ + .build/darwin-arm64/VSCode-darwin-arm64.app \ + .build/darwin-universal/VSCode-darwin-universal.app + + # Package universal app + (cd .build/darwin-universal && zip -r -X -y VSCode-darwin-universal-${VERSION}.zip VSCode-darwin-universal.app) + + - name: Upload Universal Build + uses: actions/upload-artifact@v4 + with: + name: vscode-darwin-universal + path: .build/darwin-universal/*.zip + retention-days: 7 + + build-linux: + name: Linux (${{ matrix.arch }}) + runs-on: ubuntu-latest + strategy: + matrix: + arch: [x64, armhf, arm64] + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 1 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies and tools + run: | + npm ci + sudo apt-get update + sudo apt-get install -y fakeroot dpkg rpm + + - name: Build VSCode + run: | + npm run gulp -- "vscode-linux-${{ matrix.arch }}-min" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create packages (tarball) + run: | + VERSION="${{ env.VSCODE_BUILD_VERSION }}" + PACKAGE_PATH=".build/linux-${{ matrix.arch }}/archive" + TARBALL_NAME="code-${{ env.VSCODE_QUALITY }}-${{ matrix.arch }}-$VERSION.tar.gz" + + mkdir -p "$PACKAGE_PATH" + tar -czf "$PACKAGE_PATH/$TARBALL_NAME" -C .. VSCode-linux-${{ matrix.arch }} + + - name: Create DEB package + run: | + npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-deb" + npm run gulp -- "vscode-linux-${{ matrix.arch }}-build-deb" + + - name: Create RPM package + run: | + npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-rpm" + npm run gulp -- "vscode-linux-${{ matrix.arch }}-build-rpm" + + - name: Create Snap package + if: matrix.arch == 'x64' || matrix.arch == 'arm64' + run: | + sudo snap install snapcraft --classic + npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-snap" + cd .build/linux/snap/${{ matrix.arch }}/*/ + snapcraft + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: vscode-linux-${{ matrix.arch }} + path: | + .build/linux-${{ matrix.arch }}/archive/*.tar.gz + .build/linux/deb/*/deb/*.deb + .build/linux/rpm/*/RPMS/*/*.rpm + .build/linux/snap/${{ matrix.arch }}/*/*.snap + retention-days: 7 + + create-release: + name: Create Release + needs: [build-windows, build-macos, build-universal-macos, build-linux] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Create Release + uses: softprops/action-gh-release@v1 + with: + name: VSCode ${{ env.VSCODE_BUILD_VERSION }} + draft: true + prerelease: ${{ env.VSCODE_QUALITY == 'insider' }} + files: | + artifacts/vscode-win32-x64/*.zip + artifacts/vscode-win32-x64/*.exe + artifacts/vscode-win32-arm64/*.zip + artifacts/vscode-win32-arm64/*.exe + artifacts/vscode-darwin-x64/*.zip + artifacts/vscode-darwin-arm64/*.zip + artifacts/vscode-darwin-universal/*.zip + artifacts/vscode-linux-x64/*.tar.gz + artifacts/vscode-linux-x64/*.deb + artifacts/vscode-linux-x64/*.rpm + artifacts/vscode-linux-x64/*.snap + artifacts/vscode-linux-arm64/*.tar.gz + artifacts/vscode-linux-arm64/*.deb + artifacts/vscode-linux-arm64/*.rpm + artifacts/vscode-linux-arm64/*.snap + artifacts/vscode-linux-armhf/*.tar.gz + artifacts/vscode-linux-armhf/*.deb + artifacts/vscode-linux-armhf/*.rpm + artifacts/vscode-linux-armhf/*.snap From 91a23bb2d3f69d6de2e070566e0625c1f1be8910 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 23:15:17 -0700 Subject: [PATCH 30/54] asd --- .github/workflows/build-vscode.yml | 308 ----------------------------- .github/workflows/build.yml | 6 +- 2 files changed, 4 insertions(+), 310 deletions(-) delete mode 100644 .github/workflows/build-vscode.yml diff --git a/.github/workflows/build-vscode.yml b/.github/workflows/build-vscode.yml deleted file mode 100644 index 36696417..00000000 --- a/.github/workflows/build-vscode.yml +++ /dev/null @@ -1,308 +0,0 @@ -name: Build VSCode - -on: - push: - branches: [ main ] - tags: [ 'v*' ] - pull_request: - branches: [ main ] - workflow_dispatch: - inputs: - version: - description: 'Version to build (e.g., 1.99.0)' - required: true - default: '' - quality: - description: 'Quality level (stable, insider)' - required: true - default: 'insider' - type: choice - options: - - stable - - insider - -env: - VSCODE_ARCH_WINDOWS: "x64" - VSCODE_ARCH_MACOS: "x64,arm64" - VSCODE_ARCH_LINUX: "x64,armhf,arm64" - VSCODE_QUALITY: ${{ github.event.inputs.quality || 'insider' }} - VSCODE_BUILD_VERSION: ${{ github.event.inputs.version || '1.99.0' }} - -jobs: - build-windows: - name: Windows (${{ matrix.arch }}) - runs-on: windows-latest - strategy: - matrix: - arch: [x64, arm64] - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Install dependencies - run: | - npm ci - env: - npm_config_arch: ${{ matrix.arch }} - - - name: Build VSCode - run: | - npm run gulp -- "vscode-win32-${{ matrix.arch }}-min" - npm run gulp -- "vscode-win32-${{ matrix.arch }}-inno-updater" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Sign binaries (if credentials available) - if: false # TODO!!! fill this in - Replace with your condition for when signing is available - run: | - # Implementation would depend on your signing mechanism - # For example, using signtool.exe or an external signing service - # This is where you would sign the .exe, .dll, and .node files - - - name: Create packages - run: | - $Version = "${{ env.VSCODE_BUILD_VERSION }}" - $ArchivePath = ".build\win32-${{ matrix.arch }}\VSCode-win32-${{ matrix.arch }}-$Version.zip" - New-Item -ItemType Directory -Path .build\win32-${{ matrix.arch }} -Force - 7z.exe a -tzip $ArchivePath -x!CodeSignSummary*.md ..\VSCode-win32-${{ matrix.arch }}\* -r - - # Build installers - npm run gulp -- "vscode-win32-${{ matrix.arch }}-system-setup" - npm run gulp -- "vscode-win32-${{ matrix.arch }}-user-setup" - - # Rename setup files - mv .build\win32-${{ matrix.arch }}\system-setup\VSCodeSetup.exe .build\win32-${{ matrix.arch }}\VSCodeSetup-${{ matrix.arch }}-$Version.exe - mv .build\win32-${{ matrix.arch }}\user-setup\VSCodeSetup.exe .build\win32-${{ matrix.arch }}\VSCodeUserSetup-${{ matrix.arch }}-$Version.exe - shell: pwsh - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: vscode-win32-${{ matrix.arch }} - path: | - .build/win32-${{ matrix.arch }}/*.zip - .build/win32-${{ matrix.arch }}/*.exe - retention-days: 7 - - build-macos: - name: macOS (${{ matrix.arch }}) - runs-on: macos-latest - strategy: - matrix: - arch: [x64, arm64] - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: npm ci - - - name: Build VSCode - run: | - npm run gulp -- "vscode-darwin-${{ matrix.arch }}-min" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Package app - run: | - VERSION="${{ env.VSCODE_BUILD_VERSION }}" - ARTIFACT_NAME="VSCode-darwin-${{ matrix.arch }}" - - # Create .zip archive - PACKAGE_PATH=".build/darwin-${{ matrix.arch }}/${ARTIFACT_NAME}-${VERSION}.zip" - mkdir -p .build/darwin-${{ matrix.arch }} - (cd .. && zip -r -X -y "${GITHUB_WORKSPACE}/${PACKAGE_PATH}" "${ARTIFACT_NAME}.app") - - - name: Sign app (if credentials available) - if: false # TODO!!! - add signing here - Replace with your condition for when signing is available - run: | - # Implementation would depend on your signing certificates - # For example: - # ./build/darwin/sign.sh - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: vscode-darwin-${{ matrix.arch }} - path: .build/darwin-${{ matrix.arch }}/*.zip - retention-days: 7 - - build-universal-macos: - name: Create Universal macOS Build - needs: [build-macos] - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Download x64 build - uses: actions/download-artifact@v4 - with: - name: vscode-darwin-x64 - path: .build/darwin-x64 - - - name: Download arm64 build - uses: actions/download-artifact@v4 - with: - name: vscode-darwin-arm64 - path: .build/darwin-arm64 - - - name: Create Universal build - run: | - VERSION="${{ env.VSCODE_BUILD_VERSION }}" - - # Extract both architectures - mkdir -p .build/darwin-universal - unzip -q .build/darwin-x64/VSCode-darwin-x64-${VERSION}.zip -d .build/darwin-x64 - unzip -q .build/darwin-arm64/VSCode-darwin-arm64-${VERSION}.zip -d .build/darwin-arm64 - - # Create universal app - node build/darwin/create-universal-app.js \ - .build/darwin-x64/VSCode-darwin-x64.app \ - .build/darwin-arm64/VSCode-darwin-arm64.app \ - .build/darwin-universal/VSCode-darwin-universal.app - - # Package universal app - (cd .build/darwin-universal && zip -r -X -y VSCode-darwin-universal-${VERSION}.zip VSCode-darwin-universal.app) - - - name: Upload Universal Build - uses: actions/upload-artifact@v4 - with: - name: vscode-darwin-universal - path: .build/darwin-universal/*.zip - retention-days: 7 - - build-linux: - name: Linux (${{ matrix.arch }}) - runs-on: ubuntu-latest - strategy: - matrix: - arch: [x64, armhf, arm64] - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies and tools - run: | - npm ci - sudo apt-get update - sudo apt-get install -y fakeroot dpkg rpm - - - name: Build VSCode - run: | - npm run gulp -- "vscode-linux-${{ matrix.arch }}-min" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Create packages (tarball) - run: | - VERSION="${{ env.VSCODE_BUILD_VERSION }}" - PACKAGE_PATH=".build/linux-${{ matrix.arch }}/archive" - TARBALL_NAME="code-${{ env.VSCODE_QUALITY }}-${{ matrix.arch }}-$VERSION.tar.gz" - - mkdir -p "$PACKAGE_PATH" - tar -czf "$PACKAGE_PATH/$TARBALL_NAME" -C .. VSCode-linux-${{ matrix.arch }} - - - name: Create DEB package - run: | - npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-deb" - npm run gulp -- "vscode-linux-${{ matrix.arch }}-build-deb" - - - name: Create RPM package - run: | - npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-rpm" - npm run gulp -- "vscode-linux-${{ matrix.arch }}-build-rpm" - - - name: Create Snap package - if: matrix.arch == 'x64' || matrix.arch == 'arm64' - run: | - sudo snap install snapcraft --classic - npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-snap" - cd .build/linux/snap/${{ matrix.arch }}/*/ - snapcraft - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: vscode-linux-${{ matrix.arch }} - path: | - .build/linux-${{ matrix.arch }}/archive/*.tar.gz - .build/linux/deb/*/deb/*.deb - .build/linux/rpm/*/RPMS/*/*.rpm - .build/linux/snap/${{ matrix.arch }}/*/*.snap - retention-days: 7 - - create-release: - name: Create Release - needs: [build-windows, build-macos, build-universal-macos, build-linux] - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') - steps: - - name: Download all artifacts - uses: actions/download-artifact@v4 - with: - path: artifacts - - - name: Create Release - uses: softprops/action-gh-release@v1 - with: - name: VSCode ${{ env.VSCODE_BUILD_VERSION }} - draft: true - prerelease: ${{ env.VSCODE_QUALITY == 'insider' }} - files: | - artifacts/vscode-win32-x64/*.zip - artifacts/vscode-win32-x64/*.exe - artifacts/vscode-win32-arm64/*.zip - artifacts/vscode-win32-arm64/*.exe - artifacts/vscode-darwin-x64/*.zip - artifacts/vscode-darwin-arm64/*.zip - artifacts/vscode-darwin-universal/*.zip - artifacts/vscode-linux-x64/*.tar.gz - artifacts/vscode-linux-x64/*.deb - artifacts/vscode-linux-x64/*.rpm - artifacts/vscode-linux-x64/*.snap - artifacts/vscode-linux-arm64/*.tar.gz - artifacts/vscode-linux-arm64/*.deb - artifacts/vscode-linux-arm64/*.rpm - artifacts/vscode-linux-arm64/*.snap - artifacts/vscode-linux-armhf/*.tar.gz - artifacts/vscode-linux-armhf/*.deb - artifacts/vscode-linux-armhf/*.rpm - artifacts/vscode-linux-armhf/*.snap diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 00b4a305..36696417 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,8 @@ name: Build VSCode on: push: - branches: [ main, github-workflow ] + branches: [ main ] + tags: [ 'v*' ] pull_request: branches: [ main ] workflow_dispatch: @@ -147,7 +148,7 @@ jobs: path: .build/darwin-${{ matrix.arch }}/*.zip retention-days: 7 -create-release: + build-universal-macos: name: Create Universal macOS Build needs: [build-macos] runs-on: macos-latest @@ -304,3 +305,4 @@ create-release: artifacts/vscode-linux-armhf/*.tar.gz artifacts/vscode-linux-armhf/*.deb artifacts/vscode-linux-armhf/*.rpm + artifacts/vscode-linux-armhf/*.snap From 0f0e56a2633b5f2ae2c74a690b14387739071b11 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 23:16:37 -0700 Subject: [PATCH 31/54] + --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 36696417..4e4c3044 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,7 @@ name: Build VSCode on: push: - branches: [ main ] + branches: [ main, github-workflow ] tags: [ 'v*' ] pull_request: branches: [ main ] From 93f8597dd4e92dbad801b0ba86fa749e4286d8ca Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 23:21:10 -0700 Subject: [PATCH 32/54] rm ci --- .github/workflows/build.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4e4c3044..e73dc895 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,7 +54,10 @@ jobs: - name: Install dependencies run: | - npm ci + # npm ci + npm install + npm install -g node-gyp + npm install -g gulp-cli env: npm_config_arch: ${{ matrix.arch }} @@ -116,7 +119,12 @@ jobs: cache: 'npm' - name: Install dependencies - run: npm ci + run: | + # npm ci + npm install + npm install -g node-gyp + npm install -g gulp-cli + - name: Build VSCode run: | @@ -221,7 +229,10 @@ jobs: - name: Install dependencies and tools run: | - npm ci + # npm ci + npm install + npm install -g node-gyp + npm install -g gulp-cli sudo apt-get update sudo apt-get install -y fakeroot dpkg rpm From 0ab4f8513bbe43372bda2cfbf0549d1fbf697820 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 23:23:48 -0700 Subject: [PATCH 33/54] fix? --- .github/workflows/build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e73dc895..e5e9828a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -227,14 +227,13 @@ jobs: node-version-file: '.nvmrc' cache: 'npm' - - name: Install dependencies and tools + - name: Install dependencies run: | - # npm ci + sudo apt-get update + sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev npm install npm install -g node-gyp npm install -g gulp-cli - sudo apt-get update - sudo apt-get install -y fakeroot dpkg rpm - name: Build VSCode run: | From 69a75f5c47df329b61c01a14e8017c5954d5f26e Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Sun, 23 Mar 2025 23:24:08 -0700 Subject: [PATCH 34/54] fix paste --- .../contrib/void/browser/react/src/util/inputs.tsx | 8 ++++---- .../void/browser/react/src/void-settings-tsx/Settings.tsx | 5 ++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx index 775087b0..8e82d750 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/util/inputs.tsx @@ -153,19 +153,17 @@ export const VoidInputBox2 = forwardRef(fun }) -export const VoidSimpleInputBox = ({ value, onChangeValue, placeholder, className, disabled, ...inputProps }: { +export const VoidSimpleInputBox = ({ value, onChangeValue, placeholder, className, disabled, passwordBlur, ...inputProps }: { value: string; onChangeValue: (value: string) => void; placeholder: string; className?: string; disabled?: boolean; + passwordBlur?: boolean; } & React.InputHTMLAttributes) => { - const inputRef = useRef(null); return ( onChangeValue(e.target.value)} placeholder={placeholder} @@ -174,10 +172,12 @@ export const VoidSimpleInputBox = ({ value, onChangeValue, placeholder, classNam ${disabled ? 'opacity-50 cursor-not-allowed' : ''} ${className}`} style={{ + ...passwordBlur && { WebkitTextSecurity: 'disc' }, background: asCssVariable(inputBackground), color: asCssVariable(inputForeground) }} {...inputProps} + type={undefined} // VS Code is doing some annoyingness that breaks paste if this is defined /> ); }; diff --git a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx index 3c6d2245..3b97463a 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx @@ -262,6 +262,7 @@ const ProviderSetting = ({ providerName, settingName }: { providerName: Provider const settingsState = useSettingsState() const settingValue = settingsState.settingsOfProvider[providerName][settingName] as string // this should always be a string in this component + console.log(`providerName:${providerName} settingName: ${settingName}, settingValue: ${settingValue}`) if (typeof settingValue !== 'string') { console.log('Error: Provider setting had a non-string value.') return @@ -274,11 +275,9 @@ const ProviderSetting = ({ providerName, settingName }: { providerName: Provider onChangeValue={useCallback((newVal) => { voidSettingsService.setSettingOfProvider(providerName, settingName, newVal) }, [voidSettingsService, providerName, settingName])} - // placeholder={`${providerTitle} ${settingTitle} (${placeholder})`} placeholder={`${settingTitle} (${placeholder})`} - - type={isPasswordField ? 'password' : 'text'} + passwordBlur={isPasswordField} /> {subTextMd === undefined ? null :
From 4be2c3b6fd62db25cbbacf9b4f6a6beecf342135 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 23 Mar 2025 23:29:53 -0700 Subject: [PATCH 35/54] +? --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5e9828a..c2339086 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -63,6 +63,7 @@ jobs: - name: Build VSCode run: | + npm run buildreact npm run gulp -- "vscode-win32-${{ matrix.arch }}-min" npm run gulp -- "vscode-win32-${{ matrix.arch }}-inno-updater" env: @@ -124,10 +125,12 @@ jobs: npm install npm install -g node-gyp npm install -g gulp-cli + npm install -g create-dmg - name: Build VSCode run: | + npm run buildreact npm run gulp -- "vscode-darwin-${{ matrix.arch }}-min" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -237,6 +240,7 @@ jobs: - name: Build VSCode run: | + npm run buildreact npm run gulp -- "vscode-linux-${{ matrix.arch }}-min" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From cf9482bd76d1e9c497678f053779117c10652828 Mon Sep 17 00:00:00 2001 From: Mathew Pareles Date: Sun, 23 Mar 2025 23:41:28 -0700 Subject: [PATCH 36/54] add back dropdown animation which was removed --- .../browser/react/src/sidebar-tsx/SidebarChat.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index 088ba708..48b37593 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -750,8 +750,8 @@ const ToolHeaderWrapper = ({
{/* children */} {
@@ -1018,6 +1018,9 @@ const SmallProseWrapper = ({ children }: { children: React.ReactNode }) => { leading-snug text-[13px] + [&>:first-child]:!mt-0 + [&>:last-child]:!mb-0 + prose-h1:text-[14px] prose-h1:my-4 @@ -1154,7 +1157,7 @@ const ReasoningWrapper = ({ isDoneReasoning, isStreaming, children }: { isDoneRe if (!isWriting) setIsOpen(false) // if just finished reasoning, close }, [isWriting]) return : ''} isOpen={isOpen} onClick={() => setIsOpen(v => !v)}> - +
{children}
@@ -1763,7 +1766,7 @@ const toolNameToComponent: { [T in ToolName]: ToolComponent } = { resolveReason.type === 'toofull' ? `\n(truncated)` : null - componentParams.children = + componentParams.children =
From b141b2edfef541be19ccccbd740cba0c5f98bd98 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 00:47:07 -0700 Subject: [PATCH 37/54] revert 3.7 with large macos --- .github/workflows/build.yml | 681 +++++++++++++++++++++--------------- 1 file changed, 407 insertions(+), 274 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c2339086..6564858f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,231 +1,21 @@ -name: Build VSCode +name: Build Void on: push: - branches: [ main, github-workflow ] - tags: [ 'v*' ] + branches: [ main, release/*, github-workflow ] pull_request: branches: [ main ] workflow_dispatch: - inputs: - version: - description: 'Version to build (e.g., 1.99.0)' - required: true - default: '' - quality: - description: 'Quality level (stable, insider)' - required: true - default: 'insider' - type: choice - options: - - stable - - insider - -env: - VSCODE_ARCH_WINDOWS: "x64" - VSCODE_ARCH_MACOS: "x64,arm64" - VSCODE_ARCH_LINUX: "x64,armhf,arm64" - VSCODE_QUALITY: ${{ github.event.inputs.quality || 'insider' }} - VSCODE_BUILD_VERSION: ${{ github.event.inputs.version || '1.99.0' }} jobs: - build-windows: - name: Windows (${{ matrix.arch }}) - runs-on: windows-latest - strategy: - matrix: - arch: [x64, arm64] - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Install dependencies - run: | - # npm ci - npm install - npm install -g node-gyp - npm install -g gulp-cli - env: - npm_config_arch: ${{ matrix.arch }} - - - name: Build VSCode - run: | - npm run buildreact - npm run gulp -- "vscode-win32-${{ matrix.arch }}-min" - npm run gulp -- "vscode-win32-${{ matrix.arch }}-inno-updater" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Sign binaries (if credentials available) - if: false # TODO!!! fill this in - Replace with your condition for when signing is available - run: | - # Implementation would depend on your signing mechanism - # For example, using signtool.exe or an external signing service - # This is where you would sign the .exe, .dll, and .node files - - - name: Create packages - run: | - $Version = "${{ env.VSCODE_BUILD_VERSION }}" - $ArchivePath = ".build\win32-${{ matrix.arch }}\VSCode-win32-${{ matrix.arch }}-$Version.zip" - New-Item -ItemType Directory -Path .build\win32-${{ matrix.arch }} -Force - 7z.exe a -tzip $ArchivePath -x!CodeSignSummary*.md ..\VSCode-win32-${{ matrix.arch }}\* -r - - # Build installers - npm run gulp -- "vscode-win32-${{ matrix.arch }}-system-setup" - npm run gulp -- "vscode-win32-${{ matrix.arch }}-user-setup" - - # Rename setup files - mv .build\win32-${{ matrix.arch }}\system-setup\VSCodeSetup.exe .build\win32-${{ matrix.arch }}\VSCodeSetup-${{ matrix.arch }}-$Version.exe - mv .build\win32-${{ matrix.arch }}\user-setup\VSCodeSetup.exe .build\win32-${{ matrix.arch }}\VSCodeUserSetup-${{ matrix.arch }}-$Version.exe - shell: pwsh - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: vscode-win32-${{ matrix.arch }} - path: | - .build/win32-${{ matrix.arch }}/*.zip - .build/win32-${{ matrix.arch }}/*.exe - retention-days: 7 - - build-macos: - name: macOS (${{ matrix.arch }}) - runs-on: macos-latest - strategy: - matrix: - arch: [x64, arm64] - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - # npm ci - npm install - npm install -g node-gyp - npm install -g gulp-cli - npm install -g create-dmg - - - - name: Build VSCode - run: | - npm run buildreact - npm run gulp -- "vscode-darwin-${{ matrix.arch }}-min" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Package app - run: | - VERSION="${{ env.VSCODE_BUILD_VERSION }}" - ARTIFACT_NAME="VSCode-darwin-${{ matrix.arch }}" - - # Create .zip archive - PACKAGE_PATH=".build/darwin-${{ matrix.arch }}/${ARTIFACT_NAME}-${VERSION}.zip" - mkdir -p .build/darwin-${{ matrix.arch }} - (cd .. && zip -r -X -y "${GITHUB_WORKSPACE}/${PACKAGE_PATH}" "${ARTIFACT_NAME}.app") - - - name: Sign app (if credentials available) - if: false # TODO!!! - add signing here - Replace with your condition for when signing is available - run: | - # Implementation would depend on your signing certificates - # For example: - # ./build/darwin/sign.sh - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: vscode-darwin-${{ matrix.arch }} - path: .build/darwin-${{ matrix.arch }}/*.zip - retention-days: 7 - - build-universal-macos: - name: Create Universal macOS Build - needs: [build-macos] - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Download x64 build - uses: actions/download-artifact@v4 - with: - name: vscode-darwin-x64 - path: .build/darwin-x64 - - - name: Download arm64 build - uses: actions/download-artifact@v4 - with: - name: vscode-darwin-arm64 - path: .build/darwin-arm64 - - - name: Create Universal build - run: | - VERSION="${{ env.VSCODE_BUILD_VERSION }}" - - # Extract both architectures - mkdir -p .build/darwin-universal - unzip -q .build/darwin-x64/VSCode-darwin-x64-${VERSION}.zip -d .build/darwin-x64 - unzip -q .build/darwin-arm64/VSCode-darwin-arm64-${VERSION}.zip -d .build/darwin-arm64 - - # Create universal app - node build/darwin/create-universal-app.js \ - .build/darwin-x64/VSCode-darwin-x64.app \ - .build/darwin-arm64/VSCode-darwin-arm64.app \ - .build/darwin-universal/VSCode-darwin-universal.app - - # Package universal app - (cd .build/darwin-universal && zip -r -X -y VSCode-darwin-universal-${VERSION}.zip VSCode-darwin-universal.app) - - - name: Upload Universal Build - uses: actions/upload-artifact@v4 - with: - name: vscode-darwin-universal - path: .build/darwin-universal/*.zip - retention-days: 7 - build-linux: - name: Linux (${{ matrix.arch }}) runs-on: ubuntu-latest - strategy: - matrix: - arch: [x64, armhf, arm64] steps: - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 1 + uses: actions/checkout@v3 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' cache: 'npm' @@ -238,85 +28,428 @@ jobs: npm install -g node-gyp npm install -g gulp-cli - - name: Build VSCode + - name: Build run: | npm run buildreact - npm run gulp -- "vscode-linux-${{ matrix.arch }}-min" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + npm run gulp vscode-linux-x64-min - - name: Create packages (tarball) + - name: Package run: | - VERSION="${{ env.VSCODE_BUILD_VERSION }}" - PACKAGE_PATH=".build/linux-${{ matrix.arch }}/archive" - TARBALL_NAME="code-${{ env.VSCODE_QUALITY }}-${{ matrix.arch }}-$VERSION.tar.gz" + mkdir -p .build/linux/client + ARCHIVE_PATH=".build/linux/client/void-linux-x64.tar.gz" + tar -czf $ARCHIVE_PATH -C .. VSCode-linux-x64 - mkdir -p "$PACKAGE_PATH" - tar -czf "$PACKAGE_PATH/$TARBALL_NAME" -C .. VSCode-linux-${{ matrix.arch }} - - - name: Create DEB package + - name: Generate checksum run: | - npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-deb" - npm run gulp -- "vscode-linux-${{ matrix.arch }}-build-deb" - - - name: Create RPM package - run: | - npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-rpm" - npm run gulp -- "vscode-linux-${{ matrix.arch }}-build-rpm" - - - name: Create Snap package - if: matrix.arch == 'x64' || matrix.arch == 'arm64' - run: | - sudo snap install snapcraft --classic - npm run gulp -- "vscode-linux-${{ matrix.arch }}-prepare-snap" - cd .build/linux/snap/${{ matrix.arch }}/*/ - snapcraft + cd .build/linux/client + sha256sum void-linux-x64.tar.gz > void-linux-x64.tar.gz.sha256 - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: vscode-linux-${{ matrix.arch }} + name: void-linux-x64 path: | - .build/linux-${{ matrix.arch }}/archive/*.tar.gz - .build/linux/deb/*/deb/*.deb - .build/linux/rpm/*/RPMS/*/*.rpm - .build/linux/snap/${{ matrix.arch }}/*/*.snap - retention-days: 7 + .build/linux/client/void-linux-x64.tar.gz + .build/linux/client/void-linux-x64.tar.gz.sha256 + + build-linux-arm64: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-linux-arm64-min + + - name: Package + run: | + mkdir -p .build/linux/client + ARCHIVE_PATH=".build/linux/client/void-linux-arm64.tar.gz" + tar -czf $ARCHIVE_PATH -C .. VSCode-linux-arm64 + + - name: Generate checksum + run: | + cd .build/linux/client + sha256sum void-linux-arm64.tar.gz > void-linux-arm64.tar.gz.sha256 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-linux-arm64 + path: | + .build/linux/client/void-linux-arm64.tar.gz + .build/linux/client/void-linux-arm64.tar.gz.sha256 + + build-windows: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-win32-x64-min + + - name: Package + run: | + mkdir -p .build/win32-x64 + Compress-Archive -Path ..\VSCode-win32-x64\* -DestinationPath .build\win32-x64\void-win32-x64.zip + shell: pwsh + + - name: Generate checksum + run: | + cd .build/win32-x64 + $hash = Get-FileHash -Algorithm SHA256 void-win32-x64.zip + $hash.Hash | Out-File -Encoding ascii void-win32-x64.zip.sha256 + shell: pwsh + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-win32-x64 + path: | + .build/win32-x64/void-win32-x64.zip + .build/win32-x64/void-win32-x64.zip.sha256 + + build-windows-arm64: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-win32-arm64-min + + - name: Package + run: | + mkdir -p .build/win32-arm64 + Compress-Archive -Path ..\VSCode-win32-arm64\* -DestinationPath .build\win32-arm64\void-win32-arm64.zip + shell: pwsh + + - name: Generate checksum + run: | + cd .build/win32-arm64 + $hash = Get-FileHash -Algorithm SHA256 void-win32-arm64.zip + $hash.Hash | Out-File -Encoding ascii void-win32-arm64.zip.sha256 + shell: pwsh + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-win32-arm64 + path: | + .build/win32-arm64/void-win32-arm64.zip + .build/win32-arm64/void-win32-arm64.zip.sha256 + + build-macos: + runs-on: macos-latest-xlarge + strategy: + matrix: + arch: [arm64, x64] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + npm install + npm install -g node-gyp + npm install -g gulp-cli + npm install -g create-dmg + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-darwin-${{ matrix.arch }}-min + + - name: Create temporary working directory + run: | + WORKING_DIR="${{ runner.temp }}/VoidSign-${{ matrix.arch }}" + KEYCHAIN_DIR="${WORKING_DIR}/1_Keychain" + SIGN_DIR="${WORKING_DIR}/2_Signed" + mkdir -p "${WORKING_DIR}" "${KEYCHAIN_DIR}" "${SIGN_DIR}" + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + echo "WORKING_DIR=${WORKING_DIR}" >> $GITHUB_ENV + echo "KEYCHAIN_DIR=${KEYCHAIN_DIR}" >> $GITHUB_ENV + echo "SIGN_DIR=${SIGN_DIR}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP_DIR=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV + + - name: Import certificate + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + env: + P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} + P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} + KEYCHAIN_PASSWORD: "temporary-password" + run: | + KEYCHAIN="${KEYCHAIN_DIR}/buildagent.keychain" + echo "KEYCHAIN=${KEYCHAIN}" >> $GITHUB_ENV + + # Create a new keychain + security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" + security set-keychain-settings -lut 21600 "${KEYCHAIN}" + security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" + + # Import certificate + echo "${P12_BASE64}" | base64 --decode > "${KEYCHAIN_DIR}/certificate.p12" + security import "${KEYCHAIN_DIR}/certificate.p12" -k "${KEYCHAIN}" -P "${P12_PASSWORD}" -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" > /dev/null + + # Add to keychain list + security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) + + - name: Sign Application + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + env: + CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} + VSCODE_ARCH: ${{ matrix.arch }} + run: | + export AGENT_TEMPDIRECTORY="${KEYCHAIN_DIR}" + cd $(pwd)/build/darwin + node sign.js "${SIGN_DIR}" + codesign --verify --verbose=4 "${SIGNED_DOTAPP}" + + - name: Create Unsigned App (for PR builds) + if: ${{ github.event_name == 'pull_request' || github.repository != 'voideditor/void' }} + run: | + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + echo "SIGNED_DOTAPP_DIR=$(pwd)/../VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP=$(pwd)/../VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV + + - name: Create DMG + run: | + cd "${SIGNED_DOTAPP_DIR}" + npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . || true + GENERATED_DMG=$(ls *.dmg) + mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" + + if [[ "${{ github.event_name }}" != "pull_request" && "${{ github.repository }}" == "voideditor/void" ]]; then + codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" + fi + + echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV + + - name: Notarize + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + APP_PASSWORD: ${{ secrets.APPLE_APP_PWD }} + KEYCHAIN_PASSWORD: "temporary-password" + run: | + # Store credentials for notarization + xcrun notarytool store-credentials "Void" \ + --apple-id "${APPLE_ID}" \ + --team-id "${TEAM_ID}" \ + --password "${APP_PASSWORD}" \ + --keychain "${KEYCHAIN}" + + # Submit for notarization with a timeout + xcrun notarytool submit "${SIGNED_DMG}" \ + --keychain-profile "Void" \ + --keychain "${KEYCHAIN}" \ + --wait --timeout 2h + + # Staple the notarization ticket + xcrun stapler staple "${SIGNED_DMG}" + + - name: Create Raw App Archive + run: | + cd "${SIGNED_DOTAPP_DIR}" + VOIDAPP=$(basename "${SIGNED_DOTAPP}") + ditto -c -k --sequesterRsrc --keepParent "${VOIDAPP}" "Void-RawApp-darwin-${{ matrix.arch }}.zip" + + - name: Generate Hash File + run: | + cd "${SIGNED_DOTAPP_DIR}" + SHA1=$(shasum -a 1 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) + SHA256=$(shasum -a 256 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) + TIMESTAMP=$(date +%s) + + cat > "Void-UpdJSON-darwin-${{ matrix.arch }}.json" << EOF + { + "sha256hash": "${SHA256}", + "hash": "${SHA1}", + "timestamp": ${TIMESTAMP} + } + EOF + + - name: Generate checksum for DMG + run: | + cd "${SIGNED_DOTAPP_DIR}" + shasum -a 256 "Void-Installer-darwin-${{ matrix.arch }}.dmg" > "Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256" + + - name: Upload DMG + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-dmg + path: | + ${{ env.SIGNED_DMG }} + ${{ env.SIGNED_DOTAPP_DIR }}/Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256 + + - name: Upload Raw App + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-rawapp + path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-RawApp-darwin-${{ matrix.arch }}.zip + + - name: Upload Hash File + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-hash + path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json + + create-universal-macos: + needs: build-macos + runs-on: macos-latest-large + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Download x64 DMG + uses: actions/download-artifact@v3 + with: + name: void-darwin-x64-dmg + path: .build/darwin-x64 + + - name: Download arm64 DMG + uses: actions/download-artifact@v3 + with: + name: void-darwin-arm64-dmg + path: .build/darwin-arm64 + + - name: Download x64 App + uses: actions/download-artifact@v3 + with: + name: void-darwin-x64-rawapp + path: .build/darwin-x64-app + + - name: Download arm64 App + uses: actions/download-artifact@v3 + with: + name: void-darwin-arm64-rawapp + path: .build/darwin-arm64-app + + - name: Create Universal App working dir + run: | + mkdir -p .build/darwin-universal/{x64,arm64,universal} + + - name: Extract Apps + run: | + unzip -o .build/darwin-x64-app/Void-RawApp-darwin-x64.zip -d .build/darwin-universal/x64 + unzip -o .build/darwin-arm64-app/Void-RawApp-darwin-arm64.zip -d .build/darwin-universal/arm64 + + - name: Create Universal App + run: | + # Script to create universal binary + cd build/darwin + node create-universal-app.js \ + "$(pwd)/../../.build/darwin-universal/arm64/Void.app" \ + "$(pwd)/../../.build/darwin-universal/x64/Void.app" \ + "$(pwd)/../../.build/darwin-universal/universal/Void.app" + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Install create-dmg + run: npm install -g create-dmg + + - name: Create Universal DMG + run: | + cd .build/darwin-universal/universal + create-dmg --volname "Void Installer" Void.app . || true + GENERATED_DMG=$(ls *.dmg) + mv "${GENERATED_DMG}" "../../Void-Installer-darwin-universal.dmg" + cd ../.. + shasum -a 256 Void-Installer-darwin-universal.dmg > Void-Installer-darwin-universal.dmg.sha256 + + - name: Upload Universal DMG + uses: actions/upload-artifact@v4 + with: + name: void-darwin-universal + path: | + .build/Void-Installer-darwin-universal.dmg + .build/Void-Installer-darwin-universal.dmg.sha256 create-release: - name: Create Release - needs: [build-windows, build-macos, build-universal-macos, build-linux] + needs: [build-linux, build-linux-arm64, build-windows, build-windows-arm64, build-macos, create-universal-macos] runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') steps: - name: Download all artifacts - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v3 with: - path: artifacts + path: release-artifacts - - name: Create Release + - name: Create GitHub Release uses: softprops/action-gh-release@v1 with: - name: VSCode ${{ env.VSCODE_BUILD_VERSION }} - draft: true - prerelease: ${{ env.VSCODE_QUALITY == 'insider' }} files: | - artifacts/vscode-win32-x64/*.zip - artifacts/vscode-win32-x64/*.exe - artifacts/vscode-win32-arm64/*.zip - artifacts/vscode-win32-arm64/*.exe - artifacts/vscode-darwin-x64/*.zip - artifacts/vscode-darwin-arm64/*.zip - artifacts/vscode-darwin-universal/*.zip - artifacts/vscode-linux-x64/*.tar.gz - artifacts/vscode-linux-x64/*.deb - artifacts/vscode-linux-x64/*.rpm - artifacts/vscode-linux-x64/*.snap - artifacts/vscode-linux-arm64/*.tar.gz - artifacts/vscode-linux-arm64/*.deb - artifacts/vscode-linux-arm64/*.rpm - artifacts/vscode-linux-arm64/*.snap - artifacts/vscode-linux-armhf/*.tar.gz - artifacts/vscode-linux-armhf/*.deb - artifacts/vscode-linux-armhf/*.rpm - artifacts/vscode-linux-armhf/*.snap + release-artifacts/void-linux-x64/void-linux-x64.tar.gz + release-artifacts/void-linux-x64/void-linux-x64.tar.gz.sha256 + release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz + release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz.sha256 + release-artifacts/void-win32-x64/void-win32-x64.zip + release-artifacts/void-win32-x64/void-win32-x64.zip.sha256 + release-artifacts/void-win32-arm64/void-win32-arm64.zip + release-artifacts/void-win32-arm64/void-win32-arm64.zip.sha256 + release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg + release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg.sha256 + release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg + release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg.sha256 + release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg + release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg.sha256 + draft: true + generate_release_notes: true From a86d3dc82bef2ebf9a2d04b8ffa03dea0ea460bc Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 00:47:29 -0700 Subject: [PATCH 38/54] large --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6564858f..343de17a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -185,7 +185,7 @@ jobs: .build/win32-arm64/void-win32-arm64.zip.sha256 build-macos: - runs-on: macos-latest-xlarge + runs-on: macos-latest-large strategy: matrix: arch: [arm64, x64] From 072484dd5d64705b71eb5ad070650cbb75044906 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 07:58:31 -0700 Subject: [PATCH 39/54] v4 --- .github/workflows/build.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 343de17a..bc226195 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -357,25 +357,25 @@ jobs: uses: actions/checkout@v3 - name: Download x64 DMG - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: void-darwin-x64-dmg path: .build/darwin-x64 - name: Download arm64 DMG - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: void-darwin-arm64-dmg path: .build/darwin-arm64 - name: Download x64 App - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: void-darwin-x64-rawapp path: .build/darwin-x64-app - name: Download arm64 App - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: void-darwin-arm64-rawapp path: .build/darwin-arm64-app @@ -429,7 +429,7 @@ jobs: if: startsWith(github.ref, 'refs/tags/v') steps: - name: Download all artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: path: release-artifacts From 161b446bb219277ee72b7b10eaf3011bb7967a2e Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 08:26:57 -0700 Subject: [PATCH 40/54] test3 --- .github/workflows/build.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bc226195..2b55ca02 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,9 @@ jobs: run: | sudo apt-get update sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} npm install npm install -g node-gyp npm install -g gulp-cli @@ -68,6 +71,9 @@ jobs: run: | sudo apt-get update sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} npm install npm install -g node-gyp npm install -g gulp-cli @@ -110,6 +116,9 @@ jobs: - name: Install dependencies run: | + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} npm install npm install -g node-gyp npm install -g gulp-cli @@ -154,6 +163,9 @@ jobs: - name: Install dependencies run: | + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} npm install npm install -g node-gyp npm install -g gulp-cli @@ -201,6 +213,9 @@ jobs: - name: Install dependencies run: | + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} npm install npm install -g node-gyp npm install -g gulp-cli From 28ac708904e02ac72131e61a9c58a5205ccf81dd Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 08:36:01 -0700 Subject: [PATCH 41/54] error message --- src/vs/workbench/contrib/void/browser/editCodeService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/void/browser/editCodeService.ts b/src/vs/workbench/contrib/void/browser/editCodeService.ts index ccf5484e..098b073e 100644 --- a/src/vs/workbench/contrib/void/browser/editCodeService.ts +++ b/src/vs/workbench/contrib/void/browser/editCodeService.ts @@ -1628,7 +1628,7 @@ class EditCodeService extends Disposable implements IEditCodeService { this._notifyError(e) onDone() this._undoHistory(uri) - throw e.fullError // throw error h + throw e.fullError || new Error(e.message) // throw error h } // refresh now in case onText takes a while to get 1st message From ae79229c004d269034d40ee2957fa396adb28265 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 08:43:52 -0700 Subject: [PATCH 42/54] more retry options --- .github/workflows/build.yml | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b55ca02..1a9436da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,14 @@ jobs: # Set npm config to use GitHub token for authentication to avoid rate limits npm config set //github.com/:_authToken=${{ github.token }} npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 npm install npm install -g node-gyp npm install -g gulp-cli @@ -74,6 +82,14 @@ jobs: # Set npm config to use GitHub token for authentication to avoid rate limits npm config set //github.com/:_authToken=${{ github.token }} npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 npm install npm install -g node-gyp npm install -g gulp-cli @@ -119,6 +135,14 @@ jobs: # Set npm config to use GitHub token for authentication to avoid rate limits npm config set //github.com/:_authToken=${{ github.token }} npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 npm install npm install -g node-gyp npm install -g gulp-cli @@ -166,6 +190,14 @@ jobs: # Set npm config to use GitHub token for authentication to avoid rate limits npm config set //github.com/:_authToken=${{ github.token }} npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 npm install npm install -g node-gyp npm install -g gulp-cli @@ -216,6 +248,14 @@ jobs: # Set npm config to use GitHub token for authentication to avoid rate limits npm config set //github.com/:_authToken=${{ github.token }} npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 npm install npm install -g node-gyp npm install -g gulp-cli From b1bcac5a6df577206be2b71638c6527e7140ed58 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 18:29:40 -0700 Subject: [PATCH 43/54] deps --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a9436da..0c949356 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -444,6 +444,10 @@ jobs: unzip -o .build/darwin-x64-app/Void-RawApp-darwin-x64.zip -d .build/darwin-universal/x64 unzip -o .build/darwin-arm64-app/Void-RawApp-darwin-arm64.zip -d .build/darwin-universal/arm64 + - name: Install dependencies for universal app + run: | + npm install + - name: Create Universal App run: | # Script to create universal binary From 112a770f2c060877cd0b529a0c2440fa08257e2c Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 18:31:49 -0700 Subject: [PATCH 44/54] leading 1 --- .../contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index 77697ee8..18daa000 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -730,7 +730,7 @@ const ToolHeaderWrapper = ({ {/* left */}
{title} - {desc1} + {desc1}
{/* right */} From fa1e74acf2101d8fbf082caf605755e77059a238 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 18:35:41 -0700 Subject: [PATCH 45/54] deps --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c949356..eb0d6882 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -446,7 +446,9 @@ jobs: - name: Install dependencies for universal app run: | + cd build/ npm install + npm run compile - name: Create Universal App run: | From c4e78cd3ba5e7a6f829015b06e50e8db95e68a59 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 18:36:20 -0700 Subject: [PATCH 46/54] size --- .../void/browser/react/src/markdown/ApplyBlockHoverButtons.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/markdown/ApplyBlockHoverButtons.tsx b/src/vs/workbench/contrib/void/browser/react/src/markdown/ApplyBlockHoverButtons.tsx index b09a22ba..1069b635 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/markdown/ApplyBlockHoverButtons.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/markdown/ApplyBlockHoverButtons.tsx @@ -267,7 +267,7 @@ export const useApplyButtonHTML = ({ codeStr, applyBoxId, uri }: { codeStr: stri } - const statusIndicatorHTML =
+ const statusIndicatorHTML =
Date: Mon, 24 Mar 2025 19:43:14 -0700 Subject: [PATCH 47/54] add refetch --- .github/workflows/build.yml | 527 ++++++++++++++++++++++++++++++++++++ 1 file changed, 527 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..d7b2049a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,527 @@ +name: Build Void + +on: + push: + branches: [ main, release/*, github-workflow ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + build-linux: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-linux-x64-min + + - name: Package + run: | + mkdir -p .build/linux/client + ARCHIVE_PATH=".build/linux/client/void-linux-x64.tar.gz" + tar -czf $ARCHIVE_PATH -C .. VSCode-linux-x64 + + - name: Generate checksum + run: | + cd .build/linux/client + sha256sum void-linux-x64.tar.gz > void-linux-x64.tar.gz.sha256 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-linux-x64 + path: | + .build/linux/client/void-linux-x64.tar.gz + .build/linux/client/void-linux-x64.tar.gz.sha256 + + build-linux-arm64: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-linux-arm64-min + + - name: Package + run: | + mkdir -p .build/linux/client + ARCHIVE_PATH=".build/linux/client/void-linux-arm64.tar.gz" + tar -czf $ARCHIVE_PATH -C .. VSCode-linux-arm64 + + - name: Generate checksum + run: | + cd .build/linux/client + sha256sum void-linux-arm64.tar.gz > void-linux-arm64.tar.gz.sha256 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-linux-arm64 + path: | + .build/linux/client/void-linux-arm64.tar.gz + .build/linux/client/void-linux-arm64.tar.gz.sha256 + + build-windows: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-win32-x64-min + + - name: Package + run: | + mkdir -p .build/win32-x64 + Compress-Archive -Path ..\VSCode-win32-x64\* -DestinationPath .build\win32-x64\void-win32-x64.zip + shell: pwsh + + - name: Generate checksum + run: | + cd .build/win32-x64 + $hash = Get-FileHash -Algorithm SHA256 void-win32-x64.zip + $hash.Hash | Out-File -Encoding ascii void-win32-x64.zip.sha256 + shell: pwsh + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-win32-x64 + path: | + .build/win32-x64/void-win32-x64.zip + .build/win32-x64/void-win32-x64.zip.sha256 + + build-windows-arm64: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-win32-arm64-min + + - name: Package + run: | + mkdir -p .build/win32-arm64 + Compress-Archive -Path ..\VSCode-win32-arm64\* -DestinationPath .build\win32-arm64\void-win32-arm64.zip + shell: pwsh + + - name: Generate checksum + run: | + cd .build/win32-arm64 + $hash = Get-FileHash -Algorithm SHA256 void-win32-arm64.zip + $hash.Hash | Out-File -Encoding ascii void-win32-arm64.zip.sha256 + shell: pwsh + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-win32-arm64 + path: | + .build/win32-arm64/void-win32-arm64.zip + .build/win32-arm64/void-win32-arm64.zip.sha256 + + build-macos: + runs-on: macos-latest-large + strategy: + matrix: + arch: [arm64, x64] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + npm install + npm install -g node-gyp + npm install -g gulp-cli + npm install -g create-dmg + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-darwin-${{ matrix.arch }}-min + + - name: Create temporary working directory + run: | + WORKING_DIR="${{ runner.temp }}/VoidSign-${{ matrix.arch }}" + KEYCHAIN_DIR="${WORKING_DIR}/1_Keychain" + SIGN_DIR="${WORKING_DIR}/2_Signed" + mkdir -p "${WORKING_DIR}" "${KEYCHAIN_DIR}" "${SIGN_DIR}" + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + echo "WORKING_DIR=${WORKING_DIR}" >> $GITHUB_ENV + echo "KEYCHAIN_DIR=${KEYCHAIN_DIR}" >> $GITHUB_ENV + echo "SIGN_DIR=${SIGN_DIR}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP_DIR=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV + + - name: Import certificate + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + env: + P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} + P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} + KEYCHAIN_PASSWORD: "temporary-password" + run: | + KEYCHAIN="${KEYCHAIN_DIR}/buildagent.keychain" + echo "KEYCHAIN=${KEYCHAIN}" >> $GITHUB_ENV + + # Create a new keychain + security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" + security set-keychain-settings -lut 21600 "${KEYCHAIN}" + security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" + + # Import certificate + echo "${P12_BASE64}" | base64 --decode > "${KEYCHAIN_DIR}/certificate.p12" + security import "${KEYCHAIN_DIR}/certificate.p12" -k "${KEYCHAIN}" -P "${P12_PASSWORD}" -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" > /dev/null + + # Add to keychain list + security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) + + - name: Sign Application + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + env: + CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} + VSCODE_ARCH: ${{ matrix.arch }} + run: | + export AGENT_TEMPDIRECTORY="${KEYCHAIN_DIR}" + cd $(pwd)/build/darwin + node sign.js "${SIGN_DIR}" + codesign --verify --verbose=4 "${SIGNED_DOTAPP}" + + - name: Create Unsigned App (for PR builds) + if: ${{ github.event_name == 'pull_request' || github.repository != 'voideditor/void' }} + run: | + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + echo "SIGNED_DOTAPP_DIR=$(pwd)/../VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP=$(pwd)/../VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV + + - name: Create DMG + run: | + cd "${SIGNED_DOTAPP_DIR}" + npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . || true + GENERATED_DMG=$(ls *.dmg) + mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" + + if [[ "${{ github.event_name }}" != "pull_request" && "${{ github.repository }}" == "voideditor/void" ]]; then + codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" + fi + + echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV + + - name: Notarize + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + APP_PASSWORD: ${{ secrets.APPLE_APP_PWD }} + KEYCHAIN_PASSWORD: "temporary-password" + run: | + # Store credentials for notarization + xcrun notarytool store-credentials "Void" \ + --apple-id "${APPLE_ID}" \ + --team-id "${TEAM_ID}" \ + --password "${APP_PASSWORD}" \ + --keychain "${KEYCHAIN}" + + # Submit for notarization with a timeout + xcrun notarytool submit "${SIGNED_DMG}" \ + --keychain-profile "Void" \ + --keychain "${KEYCHAIN}" \ + --wait --timeout 2h + + # Staple the notarization ticket + xcrun stapler staple "${SIGNED_DMG}" + + - name: Create Raw App Archive + run: | + cd "${SIGNED_DOTAPP_DIR}" + VOIDAPP=$(basename "${SIGNED_DOTAPP}") + ditto -c -k --sequesterRsrc --keepParent "${VOIDAPP}" "Void-RawApp-darwin-${{ matrix.arch }}.zip" + + - name: Generate Hash File + run: | + cd "${SIGNED_DOTAPP_DIR}" + SHA1=$(shasum -a 1 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) + SHA256=$(shasum -a 256 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) + TIMESTAMP=$(date +%s) + + cat > "Void-UpdJSON-darwin-${{ matrix.arch }}.json" << EOF + { + "sha256hash": "${SHA256}", + "hash": "${SHA1}", + "timestamp": ${TIMESTAMP} + } + EOF + + - name: Generate checksum for DMG + run: | + cd "${SIGNED_DOTAPP_DIR}" + shasum -a 256 "Void-Installer-darwin-${{ matrix.arch }}.dmg" > "Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256" + + - name: Upload DMG + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-dmg + path: | + ${{ env.SIGNED_DMG }} + ${{ env.SIGNED_DOTAPP_DIR }}/Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256 + + - name: Upload Raw App + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-rawapp + path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-RawApp-darwin-${{ matrix.arch }}.zip + + - name: Upload Hash File + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-hash + path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json + + create-universal-macos: + needs: build-macos + runs-on: macos-latest-large + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Download x64 DMG + uses: actions/download-artifact@v4 + with: + name: void-darwin-x64-dmg + path: .build/darwin-x64 + + - name: Download arm64 DMG + uses: actions/download-artifact@v4 + with: + name: void-darwin-arm64-dmg + path: .build/darwin-arm64 + + - name: Download x64 App + uses: actions/download-artifact@v4 + with: + name: void-darwin-x64-rawapp + path: .build/darwin-x64-app + + - name: Download arm64 App + uses: actions/download-artifact@v4 + with: + name: void-darwin-arm64-rawapp + path: .build/darwin-arm64-app + + - name: Create Universal App working dir + run: | + mkdir -p .build/darwin-universal/{x64,arm64,universal} + + - name: Extract Apps + run: | + unzip -o .build/darwin-x64-app/Void-RawApp-darwin-x64.zip -d .build/darwin-universal/x64 + unzip -o .build/darwin-arm64-app/Void-RawApp-darwin-arm64.zip -d .build/darwin-universal/arm64 + + - name: Install dependencies for universal app + run: | + cd build/ + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + + npm install + npm install -g create-dmg + npm run compile + + + - name: Create Universal App + run: | + # Script to create universal binary + cd build/darwin + node create-universal-app.js \ + "$(pwd)/../../.build/darwin-universal/arm64/Void.app" \ + "$(pwd)/../../.build/darwin-universal/x64/Void.app" \ + "$(pwd)/../../.build/darwin-universal/universal/Void.app" + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Create Universal DMG + run: | + cd .build/darwin-universal/universal + create-dmg --volname "Void Installer" Void.app . || true + GENERATED_DMG=$(ls *.dmg) + mv "${GENERATED_DMG}" "../../Void-Installer-darwin-universal.dmg" + cd ../.. + shasum -a 256 Void-Installer-darwin-universal.dmg > Void-Installer-darwin-universal.dmg.sha256 + + - name: Upload Universal DMG + uses: actions/upload-artifact@v4 + with: + name: void-darwin-universal + path: | + .build/Void-Installer-darwin-universal.dmg + .build/Void-Installer-darwin-universal.dmg.sha256 + + create-release: + needs: [build-linux, build-linux-arm64, build-windows, build-windows-arm64, build-macos, create-universal-macos] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: release-artifacts + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + files: | + release-artifacts/void-linux-x64/void-linux-x64.tar.gz + release-artifacts/void-linux-x64/void-linux-x64.tar.gz.sha256 + release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz + release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz.sha256 + release-artifacts/void-win32-x64/void-win32-x64.zip + release-artifacts/void-win32-x64/void-win32-x64.zip.sha256 + release-artifacts/void-win32-arm64/void-win32-arm64.zip + release-artifacts/void-win32-arm64/void-win32-arm64.zip.sha256 + release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg + release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg.sha256 + release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg + release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg.sha256 + release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg + release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg.sha256 + draft: true + generate_release_notes: true From f1a31246b2014d0725bbd98e3253a0b5bebf715b Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 19:46:19 -0700 Subject: [PATCH 48/54] b2 --- .github/workflows/b2.yml | 407 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 407 insertions(+) create mode 100644 .github/workflows/b2.yml diff --git a/.github/workflows/b2.yml b/.github/workflows/b2.yml new file mode 100644 index 00000000..c5dc727d --- /dev/null +++ b/.github/workflows/b2.yml @@ -0,0 +1,407 @@ +name: VS Code Build + +on: + workflow_dispatch: + inputs: + build_macos: + description: 'Build macOS' + type: boolean + default: true + build_macos_arm64: + description: 'Build macOS ARM64' + type: boolean + default: true + build_macos_universal: + description: 'Build macOS Universal' + type: boolean + default: true + build_linux: + description: 'Build Linux x64' + type: boolean + default: true + build_linux_arm64: + description: 'Build Linux ARM64' + type: boolean + default: false + build_windows: + description: 'Build Windows' + type: boolean + default: true + quality: + description: 'Quality (insider or stable)' + type: choice + options: + - insider + - stable + default: 'insider' + +env: + VSCODE_QUALITY: ${{ github.event.inputs.quality }} + NPM_REGISTRY: 'https://registry.npmjs.org/' + VSCODE_ARCH: 'x64' + VSCODE_CIBUILD: false + +jobs: + compile: + runs-on: macos-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Install Dependencies + run: | + npm ci + + - name: Compile + run: | + npm run compile + + - name: Package Compilation Output + run: | + mkdir -p .build + tar -czf compilation.tar.gz .build out-* test/integration/browser/out test/smoke/out test/automation/out + + - name: Upload Compilation Artifact + uses: actions/upload-artifact@v4 + with: + name: compilation + path: compilation.tar.gz + + compile-cli: + runs-on: ubuntu-latest + needs: compile + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Setup Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Install Dependencies + run: | + npm ci + + - name: Build CLI + run: | + cd cli + cargo build --release --bin=code + + - name: Upload CLI Artifacts + uses: actions/upload-artifact@v4 + with: + name: vscode_cli + path: cli/target/release/code + + build-macos: + if: ${{ github.event.inputs.build_macos == 'true' }} + runs-on: macos-latest + needs: [compile, compile-cli] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Download Compilation + uses: actions/download-artifact@v4 + with: + name: compilation + + - name: Extract Compilation + run: tar -xzf compilation.tar.gz + + - name: Install Dependencies + run: npm ci + + - name: Build macOS x64 + run: | + npm run gulp vscode-darwin-x64-min-ci + + - name: Download CLI + uses: actions/download-artifact@v4 + with: + name: vscode_cli + path: cli-bin + + - name: Integrate CLI + run: | + APP_ROOT="$(pwd)/../VSCode-darwin-x64" + APP_NAME="`ls $APP_ROOT | head -n 1`" + APP_PATH="$APP_ROOT/$APP_NAME" + CLI_APP_NAME=$(node -p "require(\"$APP_PATH/Contents/Resources/app/product.json\").tunnelApplicationName") + mkdir -p "$APP_PATH/Contents/Resources/app/bin" + cp cli-bin/code "$APP_PATH/Contents/Resources/app/bin/$CLI_APP_NAME" + chmod +x "$APP_PATH/Contents/Resources/app/bin/$CLI_APP_NAME" + + - name: Package macOS App + run: | + ARCHIVE_PATH="VSCode-darwin-x64.zip" + (cd ../VSCode-darwin-x64 && zip -r -X -y $(pwd)/$ARCHIVE_PATH *) + + - name: Upload macOS App + uses: actions/upload-artifact@v4 + with: + name: vscode-darwin-x64 + path: VSCode-darwin-x64.zip + + build-macos-arm64: + if: ${{ github.event.inputs.build_macos_arm64 == 'true' }} + runs-on: macos-latest + needs: [compile, compile-cli] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Download Compilation + uses: actions/download-artifact@v4 + with: + name: compilation + + - name: Extract Compilation + run: tar -xzf compilation.tar.gz + + - name: Install Dependencies + run: npm ci + + - name: Build macOS ARM64 + run: | + npm run gulp vscode-darwin-arm64-min-ci + + - name: Download CLI + uses: actions/download-artifact@v4 + with: + name: vscode_cli + path: cli-bin + + - name: Integrate CLI + run: | + APP_ROOT="$(pwd)/../VSCode-darwin-arm64" + APP_NAME="`ls $APP_ROOT | head -n 1`" + APP_PATH="$APP_ROOT/$APP_NAME" + CLI_APP_NAME=$(node -p "require(\"$APP_PATH/Contents/Resources/app/product.json\").tunnelApplicationName") + mkdir -p "$APP_PATH/Contents/Resources/app/bin" + cp cli-bin/code "$APP_PATH/Contents/Resources/app/bin/$CLI_APP_NAME" + chmod +x "$APP_PATH/Contents/Resources/app/bin/$CLI_APP_NAME" + + - name: Package macOS App + run: | + ARCHIVE_PATH="VSCode-darwin-arm64.zip" + (cd ../VSCode-darwin-arm64 && zip -r -X -y $(pwd)/$ARCHIVE_PATH *) + + - name: Upload macOS App + uses: actions/upload-artifact@v4 + with: + name: vscode-darwin-arm64 + path: VSCode-darwin-arm64.zip + + build-macos-universal: + if: ${{ github.event.inputs.build_macos_universal == 'true' && github.event.inputs.build_macos == 'true' && github.event.inputs.build_macos_arm64 == 'true' }} + runs-on: macos-latest + needs: [build-macos, build-macos-arm64] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Download x64 Build + uses: actions/download-artifact@v4 + with: + name: vscode-darwin-x64 + + - name: Download ARM64 Build + uses: actions/download-artifact@v4 + with: + name: vscode-darwin-arm64 + + - name: Extract Builds + run: | + mkdir -p VSCode-darwin-x64 + mkdir -p VSCode-darwin-arm64 + unzip VSCode-darwin-x64.zip -d VSCode-darwin-x64 + unzip VSCode-darwin-arm64.zip -d VSCode-darwin-arm64 + + - name: Install Dependencies + run: npm ci + + - name: Create Universal Build + run: | + node build/darwin/create-universal-app.js $(pwd) + + - name: Package Universal App + run: | + ARCHIVE_PATH="VSCode-darwin-universal.zip" + (cd VSCode-darwin-universal && zip -r -X -y $(pwd)/$ARCHIVE_PATH *) + + - name: Upload Universal App + uses: actions/upload-artifact@v4 + with: + name: vscode-darwin-universal + path: VSCode-darwin-universal.zip + + build-linux: + if: ${{ github.event.inputs.build_linux == 'true' }} + runs-on: ubuntu-latest + needs: [compile, compile-cli] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Install Dependencies + run: | + sudo apt-get update + sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1 + npm ci + + - name: Download Compilation + uses: actions/download-artifact@v4 + with: + name: compilation + + - name: Extract Compilation + run: tar -xzf compilation.tar.gz + + - name: Build Linux x64 + run: | + npm run gulp vscode-linux-x64-min-ci + + - name: Download CLI + uses: actions/download-artifact@v4 + with: + name: vscode_cli + path: cli-bin + + - name: Integrate CLI + run: | + CLI_APP_NAME=$(node -p "require(\"../VSCode-linux-x64/resources/app/product.json\").tunnelApplicationName") + mkdir -p "../VSCode-linux-x64/bin" + cp cli-bin/code "../VSCode-linux-x64/bin/$CLI_APP_NAME" + chmod +x "../VSCode-linux-x64/bin/$CLI_APP_NAME" + + - name: Create .tar.gz Archive + run: | + ARCHIVE_PATH="VSCode-linux-x64.tar.gz" + (cd .. && tar -czf $(pwd)/$ARCHIVE_PATH VSCode-linux-x64) + + - name: Upload Linux Build + uses: actions/upload-artifact@v4 + with: + name: vscode-linux-x64-archive + path: VSCode-linux-x64.tar.gz + + - name: Build .deb Package + run: | + npm run gulp vscode-linux-x64-prepare-deb + npm run gulp vscode-linux-x64-build-deb + + - name: Upload .deb Package + uses: actions/upload-artifact@v4 + with: + name: vscode-linux-x64-deb + path: .build/linux/deb/*/deb/*.deb + + - name: Build .rpm Package + run: | + npm run gulp vscode-linux-x64-prepare-rpm + npm run gulp vscode-linux-x64-build-rpm + + - name: Upload .rpm Package + uses: actions/upload-artifact@v4 + with: + name: vscode-linux-x64-rpm + path: .build/linux/rpm/*/*.rpm + + build-windows: + if: ${{ github.event.inputs.build_windows == 'true' }} + runs-on: windows-latest + needs: [compile, compile-cli] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Download Compilation + uses: actions/download-artifact@v4 + with: + name: compilation + + - name: Extract Compilation + shell: powershell + run: tar -xzf compilation.tar.gz + + - name: Install Dependencies + run: npm ci + + - name: Build Windows x64 + run: | + npm run gulp vscode-win32-x64-min-ci + npm run gulp vscode-win32-x64-inno-updater + + - name: Download CLI + uses: actions/download-artifact@v4 + with: + name: vscode_cli + path: cli-bin + + - name: Integrate CLI + shell: powershell + run: | + $AppProductJson = Get-Content -Raw -Path "../VSCode-win32-x64/resources/app/product.json" | ConvertFrom-Json + $CliAppName = $AppProductJson.tunnelApplicationName + $AppName = $AppProductJson.applicationName + mkdir -Force "../VSCode-win32-x64/bin" + Copy-Item -Path "cli-bin/code" -Destination "../VSCode-win32-x64/bin/$CliAppName.exe" + + - name: Package Windows Build + shell: powershell + run: | + $ArchivePath = "VSCode-win32-x64.zip" + Compress-Archive -Path "../VSCode-win32-x64/*" -DestinationPath $ArchivePath + + - name: Upload Windows Build + uses: actions/upload-artifact@v4 + with: + name: vscode-win32-x64-archive + path: VSCode-win32-x64.zip + + - name: Build User Setup + run: | + npm run gulp vscode-win32-x64-user-setup + + - name: Upload User Setup + uses: actions/upload-artifact@v4 + with: + name: vscode-win32-x64-user-setup + path: .build/win32-x64/user-setup/VSCodeSetup.exe From b52cf80bd54eb92f3b0012c79e43390534de61c8 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 19:48:11 -0700 Subject: [PATCH 49/54] update --- .github/workflows/b2.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/b2.yml b/.github/workflows/b2.yml index c5dc727d..17e3c236 100644 --- a/.github/workflows/b2.yml +++ b/.github/workflows/b2.yml @@ -1,6 +1,11 @@ name: VS Code Build on: + push: + branches: [ main, release/*, github-workflow ] + pull_request: + branches: [ main ] + workflow_dispatch: inputs: build_macos: From a6d5a5f3258a7b8418bfeb955bba35143ac2eb26 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Mon, 24 Mar 2025 22:53:54 -0700 Subject: [PATCH 50/54] universal macOS --- .github/workflows/build.yml | 122 --------------------------------- .github/workflows/test.yml | 131 ++++++++++++++++++++++++++++++++++++ 2 files changed, 131 insertions(+), 122 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7b2049a..379ba257 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -403,125 +403,3 @@ jobs: name: void-darwin-${{ matrix.arch }}-hash path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json - create-universal-macos: - needs: build-macos - runs-on: macos-latest-large - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Download x64 DMG - uses: actions/download-artifact@v4 - with: - name: void-darwin-x64-dmg - path: .build/darwin-x64 - - - name: Download arm64 DMG - uses: actions/download-artifact@v4 - with: - name: void-darwin-arm64-dmg - path: .build/darwin-arm64 - - - name: Download x64 App - uses: actions/download-artifact@v4 - with: - name: void-darwin-x64-rawapp - path: .build/darwin-x64-app - - - name: Download arm64 App - uses: actions/download-artifact@v4 - with: - name: void-darwin-arm64-rawapp - path: .build/darwin-arm64-app - - - name: Create Universal App working dir - run: | - mkdir -p .build/darwin-universal/{x64,arm64,universal} - - - name: Extract Apps - run: | - unzip -o .build/darwin-x64-app/Void-RawApp-darwin-x64.zip -d .build/darwin-universal/x64 - unzip -o .build/darwin-arm64-app/Void-RawApp-darwin-arm64.zip -d .build/darwin-universal/arm64 - - - name: Install dependencies for universal app - run: | - cd build/ - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - - npm install - npm install -g create-dmg - npm run compile - - - - name: Create Universal App - run: | - # Script to create universal binary - cd build/darwin - node create-universal-app.js \ - "$(pwd)/../../.build/darwin-universal/arm64/Void.app" \ - "$(pwd)/../../.build/darwin-universal/x64/Void.app" \ - "$(pwd)/../../.build/darwin-universal/universal/Void.app" - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Create Universal DMG - run: | - cd .build/darwin-universal/universal - create-dmg --volname "Void Installer" Void.app . || true - GENERATED_DMG=$(ls *.dmg) - mv "${GENERATED_DMG}" "../../Void-Installer-darwin-universal.dmg" - cd ../.. - shasum -a 256 Void-Installer-darwin-universal.dmg > Void-Installer-darwin-universal.dmg.sha256 - - - name: Upload Universal DMG - uses: actions/upload-artifact@v4 - with: - name: void-darwin-universal - path: | - .build/Void-Installer-darwin-universal.dmg - .build/Void-Installer-darwin-universal.dmg.sha256 - - create-release: - needs: [build-linux, build-linux-arm64, build-windows, build-windows-arm64, build-macos, create-universal-macos] - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') - steps: - - name: Download all artifacts - uses: actions/download-artifact@v4 - with: - path: release-artifacts - - - name: Create GitHub Release - uses: softprops/action-gh-release@v1 - with: - files: | - release-artifacts/void-linux-x64/void-linux-x64.tar.gz - release-artifacts/void-linux-x64/void-linux-x64.tar.gz.sha256 - release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz - release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz.sha256 - release-artifacts/void-win32-x64/void-win32-x64.zip - release-artifacts/void-win32-x64/void-win32-x64.zip.sha256 - release-artifacts/void-win32-arm64/void-win32-arm64.zip - release-artifacts/void-win32-arm64/void-win32-arm64.zip.sha256 - release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg - release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg.sha256 - release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg - release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg.sha256 - release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg - release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg.sha256 - draft: true - generate_release_notes: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..3ac12e9b --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,131 @@ +name: Create Universal MacOS + +on: + push: + branches: [ main, release/*, github-workflow ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + create-universal-macos: + runs-on: macos-latest-large + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Download x64 DMG + uses: actions/download-artifact@v4 + with: + name: void-darwin-x64-dmg + path: .build/darwin-x64 + + - name: Download arm64 DMG + uses: actions/download-artifact@v4 + with: + name: void-darwin-arm64-dmg + path: .build/darwin-arm64 + + - name: Download x64 App + uses: actions/download-artifact@v4 + with: + name: void-darwin-x64-rawapp + path: .build/darwin-x64-app + + - name: Download arm64 App + uses: actions/download-artifact@v4 + with: + name: void-darwin-arm64-rawapp + path: .build/darwin-arm64-app + + - name: Create Universal App working dir + run: | + mkdir -p .build/darwin-universal/{x64,arm64,universal} + + - name: Extract Apps + run: | + unzip -o .build/darwin-x64-app/Void-RawApp-darwin-x64.zip -d .build/darwin-universal/x64 + unzip -o .build/darwin-arm64-app/Void-RawApp-darwin-arm64.zip -d .build/darwin-universal/arm64 + + - name: Install dependencies for universal app + run: | + cd build/ + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + + npm install + npm install -g create-dmg + npm run compile + + + - name: Create Universal App + run: | + # Script to create universal binary + cd build/darwin + node create-universal-app.js \ + "$(pwd)/../../.build/darwin-universal/arm64/Void.app" \ + "$(pwd)/../../.build/darwin-universal/x64/Void.app" \ + "$(pwd)/../../.build/darwin-universal/universal/Void.app" + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + + - name: Create Universal DMG + run: | + cd .build/darwin-universal/universal + create-dmg --volname "Void Installer" Void.app . || true + GENERATED_DMG=$(ls *.dmg) + mv "${GENERATED_DMG}" "../../Void-Installer-darwin-universal.dmg" + cd ../.. + shasum -a 256 Void-Installer-darwin-universal.dmg > Void-Installer-darwin-universal.dmg.sha256 + + - name: Upload Universal DMG + uses: actions/upload-artifact@v4 + with: + name: void-darwin-universal + path: | + .build/Void-Installer-darwin-universal.dmg + .build/Void-Installer-darwin-universal.dmg.sha256 + + create-release: + needs: [create-universal-macos] + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: release-artifacts + + - name: Create GitHub Release + uses: softprops/action-gh-release@v1 + with: + files: | + release-artifacts/void-linux-x64/void-linux-x64.tar.gz + release-artifacts/void-linux-x64/void-linux-x64.tar.gz.sha256 + release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz + release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz.sha256 + release-artifacts/void-win32-x64/void-win32-x64.zip + release-artifacts/void-win32-x64/void-win32-x64.zip.sha256 + release-artifacts/void-win32-arm64/void-win32-arm64.zip + release-artifacts/void-win32-arm64/void-win32-arm64.zip.sha256 + release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg + release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg.sha256 + release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg + release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg.sha256 + release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg + release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg.sha256 + draft: true + generate_release_notes: true From ccbe1911d2d6592ebd58711c934fdcfbc7f55fd5 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Tue, 25 Mar 2025 20:04:19 -0700 Subject: [PATCH 51/54] change build --- .github/workflows/b2.yml | 412 ----------------- .github/workflows/insider-linux.yml | 543 ++++++++++++++++++++++ .github/workflows/insider-macos.yml | 134 ++++++ .github/workflows/insider-spearhead.yml | 90 ++++ .github/workflows/insider-windows.yml | 311 +++++++++++++ .github/workflows/lock.yml | 16 + .github/workflows/stable-linux.yml | 574 ++++++++++++++++++++++++ .github/workflows/stable-macos.yml | 132 ++++++ .github/workflows/stable-spearhead.yml | 85 ++++ .github/workflows/stable-windows.yml | 307 +++++++++++++ .github/workflows/stale.yml | 25 ++ .github/workflows/void-build.yml | 412 +++++++++++++++++ 12 files changed, 2629 insertions(+), 412 deletions(-) delete mode 100644 .github/workflows/b2.yml create mode 100644 .github/workflows/insider-linux.yml create mode 100644 .github/workflows/insider-macos.yml create mode 100644 .github/workflows/insider-spearhead.yml create mode 100644 .github/workflows/insider-windows.yml create mode 100644 .github/workflows/lock.yml create mode 100644 .github/workflows/stable-linux.yml create mode 100644 .github/workflows/stable-macos.yml create mode 100644 .github/workflows/stable-spearhead.yml create mode 100644 .github/workflows/stable-windows.yml create mode 100644 .github/workflows/stale.yml create mode 100644 .github/workflows/void-build.yml diff --git a/.github/workflows/b2.yml b/.github/workflows/b2.yml deleted file mode 100644 index 17e3c236..00000000 --- a/.github/workflows/b2.yml +++ /dev/null @@ -1,412 +0,0 @@ -name: VS Code Build - -on: - push: - branches: [ main, release/*, github-workflow ] - pull_request: - branches: [ main ] - - workflow_dispatch: - inputs: - build_macos: - description: 'Build macOS' - type: boolean - default: true - build_macos_arm64: - description: 'Build macOS ARM64' - type: boolean - default: true - build_macos_universal: - description: 'Build macOS Universal' - type: boolean - default: true - build_linux: - description: 'Build Linux x64' - type: boolean - default: true - build_linux_arm64: - description: 'Build Linux ARM64' - type: boolean - default: false - build_windows: - description: 'Build Windows' - type: boolean - default: true - quality: - description: 'Quality (insider or stable)' - type: choice - options: - - insider - - stable - default: 'insider' - -env: - VSCODE_QUALITY: ${{ github.event.inputs.quality }} - NPM_REGISTRY: 'https://registry.npmjs.org/' - VSCODE_ARCH: 'x64' - VSCODE_CIBUILD: false - -jobs: - compile: - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Install Dependencies - run: | - npm ci - - - name: Compile - run: | - npm run compile - - - name: Package Compilation Output - run: | - mkdir -p .build - tar -czf compilation.tar.gz .build out-* test/integration/browser/out test/smoke/out test/automation/out - - - name: Upload Compilation Artifact - uses: actions/upload-artifact@v4 - with: - name: compilation - path: compilation.tar.gz - - compile-cli: - runs-on: ubuntu-latest - needs: compile - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Setup Rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - - name: Install Dependencies - run: | - npm ci - - - name: Build CLI - run: | - cd cli - cargo build --release --bin=code - - - name: Upload CLI Artifacts - uses: actions/upload-artifact@v4 - with: - name: vscode_cli - path: cli/target/release/code - - build-macos: - if: ${{ github.event.inputs.build_macos == 'true' }} - runs-on: macos-latest - needs: [compile, compile-cli] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Download Compilation - uses: actions/download-artifact@v4 - with: - name: compilation - - - name: Extract Compilation - run: tar -xzf compilation.tar.gz - - - name: Install Dependencies - run: npm ci - - - name: Build macOS x64 - run: | - npm run gulp vscode-darwin-x64-min-ci - - - name: Download CLI - uses: actions/download-artifact@v4 - with: - name: vscode_cli - path: cli-bin - - - name: Integrate CLI - run: | - APP_ROOT="$(pwd)/../VSCode-darwin-x64" - APP_NAME="`ls $APP_ROOT | head -n 1`" - APP_PATH="$APP_ROOT/$APP_NAME" - CLI_APP_NAME=$(node -p "require(\"$APP_PATH/Contents/Resources/app/product.json\").tunnelApplicationName") - mkdir -p "$APP_PATH/Contents/Resources/app/bin" - cp cli-bin/code "$APP_PATH/Contents/Resources/app/bin/$CLI_APP_NAME" - chmod +x "$APP_PATH/Contents/Resources/app/bin/$CLI_APP_NAME" - - - name: Package macOS App - run: | - ARCHIVE_PATH="VSCode-darwin-x64.zip" - (cd ../VSCode-darwin-x64 && zip -r -X -y $(pwd)/$ARCHIVE_PATH *) - - - name: Upload macOS App - uses: actions/upload-artifact@v4 - with: - name: vscode-darwin-x64 - path: VSCode-darwin-x64.zip - - build-macos-arm64: - if: ${{ github.event.inputs.build_macos_arm64 == 'true' }} - runs-on: macos-latest - needs: [compile, compile-cli] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Download Compilation - uses: actions/download-artifact@v4 - with: - name: compilation - - - name: Extract Compilation - run: tar -xzf compilation.tar.gz - - - name: Install Dependencies - run: npm ci - - - name: Build macOS ARM64 - run: | - npm run gulp vscode-darwin-arm64-min-ci - - - name: Download CLI - uses: actions/download-artifact@v4 - with: - name: vscode_cli - path: cli-bin - - - name: Integrate CLI - run: | - APP_ROOT="$(pwd)/../VSCode-darwin-arm64" - APP_NAME="`ls $APP_ROOT | head -n 1`" - APP_PATH="$APP_ROOT/$APP_NAME" - CLI_APP_NAME=$(node -p "require(\"$APP_PATH/Contents/Resources/app/product.json\").tunnelApplicationName") - mkdir -p "$APP_PATH/Contents/Resources/app/bin" - cp cli-bin/code "$APP_PATH/Contents/Resources/app/bin/$CLI_APP_NAME" - chmod +x "$APP_PATH/Contents/Resources/app/bin/$CLI_APP_NAME" - - - name: Package macOS App - run: | - ARCHIVE_PATH="VSCode-darwin-arm64.zip" - (cd ../VSCode-darwin-arm64 && zip -r -X -y $(pwd)/$ARCHIVE_PATH *) - - - name: Upload macOS App - uses: actions/upload-artifact@v4 - with: - name: vscode-darwin-arm64 - path: VSCode-darwin-arm64.zip - - build-macos-universal: - if: ${{ github.event.inputs.build_macos_universal == 'true' && github.event.inputs.build_macos == 'true' && github.event.inputs.build_macos_arm64 == 'true' }} - runs-on: macos-latest - needs: [build-macos, build-macos-arm64] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Download x64 Build - uses: actions/download-artifact@v4 - with: - name: vscode-darwin-x64 - - - name: Download ARM64 Build - uses: actions/download-artifact@v4 - with: - name: vscode-darwin-arm64 - - - name: Extract Builds - run: | - mkdir -p VSCode-darwin-x64 - mkdir -p VSCode-darwin-arm64 - unzip VSCode-darwin-x64.zip -d VSCode-darwin-x64 - unzip VSCode-darwin-arm64.zip -d VSCode-darwin-arm64 - - - name: Install Dependencies - run: npm ci - - - name: Create Universal Build - run: | - node build/darwin/create-universal-app.js $(pwd) - - - name: Package Universal App - run: | - ARCHIVE_PATH="VSCode-darwin-universal.zip" - (cd VSCode-darwin-universal && zip -r -X -y $(pwd)/$ARCHIVE_PATH *) - - - name: Upload Universal App - uses: actions/upload-artifact@v4 - with: - name: vscode-darwin-universal - path: VSCode-darwin-universal.zip - - build-linux: - if: ${{ github.event.inputs.build_linux == 'true' }} - runs-on: ubuntu-latest - needs: [compile, compile-cli] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1 - npm ci - - - name: Download Compilation - uses: actions/download-artifact@v4 - with: - name: compilation - - - name: Extract Compilation - run: tar -xzf compilation.tar.gz - - - name: Build Linux x64 - run: | - npm run gulp vscode-linux-x64-min-ci - - - name: Download CLI - uses: actions/download-artifact@v4 - with: - name: vscode_cli - path: cli-bin - - - name: Integrate CLI - run: | - CLI_APP_NAME=$(node -p "require(\"../VSCode-linux-x64/resources/app/product.json\").tunnelApplicationName") - mkdir -p "../VSCode-linux-x64/bin" - cp cli-bin/code "../VSCode-linux-x64/bin/$CLI_APP_NAME" - chmod +x "../VSCode-linux-x64/bin/$CLI_APP_NAME" - - - name: Create .tar.gz Archive - run: | - ARCHIVE_PATH="VSCode-linux-x64.tar.gz" - (cd .. && tar -czf $(pwd)/$ARCHIVE_PATH VSCode-linux-x64) - - - name: Upload Linux Build - uses: actions/upload-artifact@v4 - with: - name: vscode-linux-x64-archive - path: VSCode-linux-x64.tar.gz - - - name: Build .deb Package - run: | - npm run gulp vscode-linux-x64-prepare-deb - npm run gulp vscode-linux-x64-build-deb - - - name: Upload .deb Package - uses: actions/upload-artifact@v4 - with: - name: vscode-linux-x64-deb - path: .build/linux/deb/*/deb/*.deb - - - name: Build .rpm Package - run: | - npm run gulp vscode-linux-x64-prepare-rpm - npm run gulp vscode-linux-x64-build-rpm - - - name: Upload .rpm Package - uses: actions/upload-artifact@v4 - with: - name: vscode-linux-x64-rpm - path: .build/linux/rpm/*/*.rpm - - build-windows: - if: ${{ github.event.inputs.build_windows == 'true' }} - runs-on: windows-latest - needs: [compile, compile-cli] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Download Compilation - uses: actions/download-artifact@v4 - with: - name: compilation - - - name: Extract Compilation - shell: powershell - run: tar -xzf compilation.tar.gz - - - name: Install Dependencies - run: npm ci - - - name: Build Windows x64 - run: | - npm run gulp vscode-win32-x64-min-ci - npm run gulp vscode-win32-x64-inno-updater - - - name: Download CLI - uses: actions/download-artifact@v4 - with: - name: vscode_cli - path: cli-bin - - - name: Integrate CLI - shell: powershell - run: | - $AppProductJson = Get-Content -Raw -Path "../VSCode-win32-x64/resources/app/product.json" | ConvertFrom-Json - $CliAppName = $AppProductJson.tunnelApplicationName - $AppName = $AppProductJson.applicationName - mkdir -Force "../VSCode-win32-x64/bin" - Copy-Item -Path "cli-bin/code" -Destination "../VSCode-win32-x64/bin/$CliAppName.exe" - - - name: Package Windows Build - shell: powershell - run: | - $ArchivePath = "VSCode-win32-x64.zip" - Compress-Archive -Path "../VSCode-win32-x64/*" -DestinationPath $ArchivePath - - - name: Upload Windows Build - uses: actions/upload-artifact@v4 - with: - name: vscode-win32-x64-archive - path: VSCode-win32-x64.zip - - - name: Build User Setup - run: | - npm run gulp vscode-win32-x64-user-setup - - - name: Upload User Setup - uses: actions/upload-artifact@v4 - with: - name: vscode-win32-x64-user-setup - path: .build/win32-x64/user-setup/VSCodeSetup.exe diff --git a/.github/workflows/insider-linux.yml b/.github/workflows/insider-linux.yml new file mode 100644 index 00000000..a9e9cc95 --- /dev/null +++ b/.github/workflows/insider-linux.yml @@ -0,0 +1,543 @@ +name: insider-linux + +on: + workflow_dispatch: + inputs: + force_version: + type: boolean + description: Force update version + generate_assets: + type: boolean + description: Generate assets + checkout_pr: + type: string + description: Checkout PR + repository_dispatch: + types: [insider] + push: + branches: [ insider ] + paths-ignore: + - '**/*.md' + - 'upstream/*.json' + pull_request: + branches: [ insider ] + paths-ignore: + - '**/*.md' + +env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + APP_NAME: VSCodium + ASSETS_REPOSITORY: ${{ github.repository }}-insiders + BINARY_NAME: codium-insiders + DISABLE_UPDATE: 'yes' + GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} + GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'insider' }} + ORG_NAME: ${{ github.repository_owner }} + OS_NAME: linux + VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions + VSCODE_QUALITY: insider + +jobs: + check: + runs-on: ubuntu-latest + outputs: + MS_COMMIT: ${{ env.MS_COMMIT }} + MS_TAG: ${{ env.MS_TAG }} + RELEASE_VERSION: ${{ env.RELEASE_VERSION }} + SHOULD_BUILD: ${{ env.SHOULD_BUILD }} + SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + + - name: Clone VSCode repo + run: ./get_repo.sh + + - name: Check PR or cron + env: + GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} + run: ./check_cron_or_pr.sh + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHECK_ALL: 'yes' + run: ./check_tags.sh + + compile: + needs: + - check + runs-on: ubuntu-20.04 + env: + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} + VSCODE_ARCH: 'x64' + outputs: + BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + if: env.SHOULD_BUILD == 'yes' + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + + - name: Setup GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 10 + platform: x64 + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + if: env.SHOULD_BUILD == 'yes' + + - name: Install Yarn + run: npm install -g yarn + if: env.SHOULD_BUILD == 'yes' + + - name: Setup Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + if: env.SHOULD_BUILD == 'yes' + + - name: Install libkrb5-dev + run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev + if: env.SHOULD_BUILD == 'yes' + + - name: Clone VSCode repo + run: ./get_repo.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Build + env: + SHOULD_BUILD_REH: 'no' + SHOULD_BUILD_REH_WEB: 'no' + run: ./build.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Compress vscode artifact + run: | + find vscode -type f -not -path "*/node_modules/*" -not -path "vscode/.build/node/*" -not -path "vscode/.git/*" > vscode.txt + echo "vscode/.build/extensions/node_modules" >> vscode.txt + echo "vscode/.git" >> vscode.txt + tar -czf vscode.tar.gz -T vscode.txt + if: env.SHOULD_BUILD == 'yes' + + - name: Upload vscode artifact + uses: actions/upload-artifact@v4 + with: + name: vscode + path: ./vscode.tar.gz + retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }} + if: env.SHOULD_BUILD == 'yes' + + build: + needs: + - check + - compile + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - slug: X64 + vscode_arch: x64 + npm_arch: x64 + image: vscodium/vscodium-linux-build-agent:focal-x64 + - slug: ARM64 + vscode_arch: arm64 + npm_arch: arm64 + image: vscodium/vscodium-linux-build-agent:focal-arm64 + - slug: ARM32 + vscode_arch: armhf + npm_arch: arm + image: vscodium/vscodium-linux-build-agent:focal-armhf + - slug: RISCV64 + vscode_arch: riscv64 + npm_arch: riscv64 + image: vscodium/vscodium-linux-build-agent:focal-riscv64 + - slug: LOONG64 + vscode_arch: loong64 + npm_arch: loong64 + image: vscodium/vscodium-linux-build-agent:beige-loong64 + - slug: PPC64 + vscode_arch: ppc64le + npm_arch: ppc64 + image: vscodium/vscodium-linux-build-agent:focal-ppc64le + container: + image: ${{ matrix.image }} + env: + BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} + DISABLED: ${{ vars[format('DISABLE_INSIDER_LINUX_APP_{0}', matrix.slug)] }} + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} + SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} + VSCODE_ARCH: ${{ matrix.vscode_arch }} + outputs: + RELEASE_VERSION: ${{ env.RELEASE_VERSION }} + SHOULD_BUILD: ${{ env.SHOULD_BUILD }} + SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' + + - name: Install GH + run: ./install_gh.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Check existing VSCodium tags/releases + env: + CHECK_REH: 'no' + DISABLE_APPIMAGE: ${{ vars.DISABLE_INSIDER_APPIMAGE }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./check_tags.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' + + - name: Install libkrb5-dev + run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' + + - name: Download vscode artifact + uses: actions/download-artifact@v4 + with: + name: vscode + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + npm_config_arch: ${{ matrix.npm_arch }} + run: ./build/linux/package_bin.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' + + - name: Prepare assets + env: + SHOULD_BUILD_REH: 'no' + SHOULD_BUILD_REH_WEB: 'no' + run: ./prepare_assets.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./release.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Update versions repo + env: + FORCE_UPDATE: ${{ github.event.inputs.force_version }} + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./update_version.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Upload assets + uses: actions/upload-artifact@v4 + with: + name: bin-${{ matrix.vscode_arch }} + path: assets/ + retention-days: 3 + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' + + reh_linux: + needs: + - check + - compile + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + include: + - slug: X64 + vscode_arch: x64 + npm_arch: x64 + - slug: ARM64 + vscode_arch: arm64 + npm_arch: arm64 + - slug: ARM32 + vscode_arch: armhf + npm_arch: arm + - slug: PPC64 + vscode_arch: ppc64le + npm_arch: ppc64 + - slug: RISCV64 + vscode_arch: riscv64 + npm_arch: riscv64 + - slug: LOONG64 + vscode_arch: loong64 + npm_arch: loong64 + - slug: S390X + vscode_arch: s390x + npm_arch: s390x + env: + BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} + DISABLED: ${{ vars[format('DISABLE_INSIDER_LINUX_REH_{0}', matrix.slug)] }} + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }} + SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} + VSCODE_ARCH: ${{ matrix.vscode_arch }} + if: needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true' + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + if: env.DISABLED != 'yes' + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + if: env.DISABLED != 'yes' + + - name: Setup GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 10 + platform: x64 + if: env.DISABLED != 'yes' + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + if: env.DISABLED != 'yes' + + - name: Setup Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + if: env.DISABLED != 'yes' + + - name: Install libkrb5-dev + run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev + if: env.DISABLED != 'yes' + + - name: Install GH + run: ./install_gh.sh + if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHECK_ONLY_REH: 'yes' + run: ./check_tags.sh + if: env.DISABLED != 'yes' + + - name: Download vscode artifact + uses: actions/download-artifact@v4 + with: + name: vscode + if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + npm_config_arch: ${{ matrix.npm_arch }} + run: ./build/linux/package_reh.sh + if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./release.sh + if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no') + + - name: Upload assets + uses: actions/upload-artifact@v4 + with: + name: reh-linux-${{ matrix.vscode_arch }} + path: assets/ + retention-days: 3 + if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' + + reh_alpine: + needs: + - check + - compile + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + include: + - slug: X64 + vscode_arch: x64 + npm_arch: x64 + - slug: ARM64 + vscode_arch: arm64 + npm_arch: arm64 + env: + BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} + DISABLED: ${{ vars[format('DISABLE_INSIDER_ALPINE_REH_{0}', matrix.slug)] }} + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + OS_NAME: alpine + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }} + SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} + VSCODE_ARCH: ${{ matrix.vscode_arch }} + if: needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true' + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + + - name: Setup GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 10 + platform: x64 + + - name: Install GH + run: ./install_gh.sh + if: env.SHOULD_DEPLOY == 'yes' + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHECK_ONLY_REH: 'yes' + run: ./check_tags.sh + + - name: Install libkrb5-dev + run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev + if: env.SHOULD_BUILD == 'yes' + + - name: Download vscode artifact + uses: actions/download-artifact@v4 + with: + name: vscode + if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + npm_config_arch: ${{ matrix.npm_arch }} + run: ./build/alpine/package_reh.sh + if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./release.sh + if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no') + + - name: Upload assets + uses: actions/upload-artifact@v4 + with: + name: reh-alpine-${{ matrix.vscode_arch }} + path: assets/ + retention-days: 3 + if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' + + aur: + needs: + - check + - build + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - package_name: vscodium-insiders-bin + - package_name: vscodium-insiders + if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && github.event.inputs.generate_assets != 'true' + + steps: + - name: Get version + env: + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + run: echo "PACKAGE_VERSION=${RELEASE_VERSION/-*/}" >> "${GITHUB_ENV}" + + - name: Publish ${{ matrix.package_name }} + uses: zokugun/github-actions-aur-releaser@v1 + with: + package_name: ${{ matrix.package_name }} + package_version: ${{ env.PACKAGE_VERSION }} + aur_private_key: ${{ secrets.AUR_PRIVATE_KEY }} + aur_username: ${{ secrets.AUR_USERNAME }} + aur_email: ${{ secrets.AUR_EMAIL }} + + snap: + needs: + - check + - build + runs-on: ubuntu-latest + env: + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SNAP_NAME: codium-insiders + strategy: + fail-fast: false + matrix: + platform: + - amd64 + - arm64 + if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && needs.check.outputs.SHOULD_BUILD_SNAP != 'no' && vars.DISABLE_INSIDER_SNAP != 'yes' + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + + - uses: docker/setup-qemu-action@v3 + + - uses: diddlesnaps/snapcraft-multiarch-action@v1 + with: + path: stores/snapcraft/insider + architecture: ${{ matrix.platform }} + id: build + + - uses: diddlesnaps/snapcraft-review-action@v1 + with: + snap: ${{ steps.build.outputs.snap }} + isClassic: 'true' + + - uses: svenstaro/upload-release-action@v2 + with: + repo_name: ${{ env.ASSETS_REPOSITORY }} + repo_token: ${{ secrets.STRONGER_GITHUB_TOKEN }} + file: ${{ steps.build.outputs.snap }} + tag: ${{ env.RELEASE_VERSION }} diff --git a/.github/workflows/insider-macos.yml b/.github/workflows/insider-macos.yml new file mode 100644 index 00000000..e8751c77 --- /dev/null +++ b/.github/workflows/insider-macos.yml @@ -0,0 +1,134 @@ +name: insider-macos + +on: + workflow_dispatch: + inputs: + force_version: + type: boolean + description: Force update version + generate_assets: + type: boolean + description: Generate assets + checkout_pr: + type: string + description: Checkout PR + repository_dispatch: + types: [insider] + push: + branches: [ insider ] + paths-ignore: + - '**/*.md' + - 'upstream/*.json' + pull_request: + branches: [ insider ] + paths-ignore: + - '**/*.md' + +env: + APP_NAME: VSCodium + ASSETS_REPOSITORY: ${{ github.repository }}-insiders + BINARY_NAME: codium-insiders + GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'insider' }} + GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} + ORG_NAME: ${{ github.repository_owner }} + OS_NAME: osx + VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions + VSCODE_QUALITY: insider + +jobs: + build: + runs-on: ${{ matrix.runner }} + env: + VSCODE_ARCH: ${{ matrix.vscode_arch }} + strategy: + fail-fast: false + matrix: + include: + - runner: macos-13 + vscode_arch: x64 + - runner: [self-hosted, macOS, ARM64] + vscode_arch: arm64 + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: . get_pr.sh + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + + - name: Setup Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + if: env.VSCODE_ARCH == 'x64' + + - name: Clone VSCode repo + run: . get_repo.sh + + - name: Check PR or cron + env: + GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} + run: . check_cron_or_pr.sh + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: . check_tags.sh + if: env.SHOULD_DEPLOY == 'yes' + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./build.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Prepare assets + env: + CERTIFICATE_OSX_APP_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_APP_PASSWORD }} + CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_NEW_ID }} + CERTIFICATE_OSX_P12_DATA: ${{ secrets.CERTIFICATE_OSX_NEW_P12_DATA }} + CERTIFICATE_OSX_P12_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_P12_PASSWORD }} + CERTIFICATE_OSX_TEAM_ID: ${{ secrets.CERTIFICATE_OSX_NEW_TEAM_ID }} + run: ./prepare_assets.sh + if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./release.sh + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Update versions repo + env: + FORCE_UPDATE: ${{ github.event.inputs.force_version }} + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./update_version.sh + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Upload assets + uses: actions/upload-artifact@v4 + with: + name: bin-${{ matrix.vscode_arch }} + path: assets/ + retention-days: 3 + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' + + - name: Clean up keychain + if: always() + run: | + KEYCHAIN=$RUNNER_TEMP/build.keychain + + if [ -f "$KEYCHAIN" ]; + then + security delete-keychain $KEYCHAIN + fi diff --git a/.github/workflows/insider-spearhead.yml b/.github/workflows/insider-spearhead.yml new file mode 100644 index 00000000..726acae2 --- /dev/null +++ b/.github/workflows/insider-spearhead.yml @@ -0,0 +1,90 @@ +name: insider-spearhead + +on: + workflow_dispatch: + inputs: + new_release: + type: boolean + description: Force new Release + force_dispatch: + type: boolean + description: Force dispatch + dont_update: + type: boolean + description: Don't update VSCode + dont_dispatch: + type: boolean + description: Disable dispatch + schedule: + - cron: '0 7 * * *' + +jobs: + build: + runs-on: macos-14 + env: + APP_NAME: VSCodium + ASSETS_REPOSITORY: ${{ github.repository }}-insiders + BINARY_NAME: codium-insiders + GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} + ORG_NAME: ${{ github.repository_owner }} + OS_NAME: osx + VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions + VSCODE_ARCH: arm64 + VSCODE_LATEST: ${{ github.event.inputs.dont_update == 'true' && 'no' || 'yes' }} + VSCODE_QUALITY: insider + + steps: + - uses: actions/checkout@v4 + with: + ref: insider + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + + - name: Clone VSCode repo + run: . get_repo.sh + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NEW_RELEASE: ${{ github.event.inputs.new_release }} + IS_SPEARHEAD: 'yes' + run: . check_tags.sh + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./build.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + git_user_signingkey: true + git_commit_gpgsign: true + if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true' + + - name: Update upstream version + run: ./update_upstream.sh + if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true' + + - name: Prepare source + run: ./prepare_src.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Release source + env: + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./release.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Dispatch builds + uses: peter-evans/repository-dispatch@v3 + with: + event-type: 'insider' + if: github.event.inputs.dont_dispatch != 'true' && (env.SHOULD_BUILD == 'yes' || github.event.inputs.force_dispatch == 'true') diff --git a/.github/workflows/insider-windows.yml b/.github/workflows/insider-windows.yml new file mode 100644 index 00000000..dac313a8 --- /dev/null +++ b/.github/workflows/insider-windows.yml @@ -0,0 +1,311 @@ +name: insider-windows + +on: + workflow_dispatch: + inputs: + force_version: + type: boolean + description: Force update version + generate_assets: + type: boolean + description: Generate assets + checkout_pr: + type: string + description: Checkout PR + repository_dispatch: + types: [insider] + push: + branches: [ insider ] + paths-ignore: + - '**/*.md' + - 'upstream/*.json' + pull_request: + branches: [ insider ] + paths-ignore: + - '**/*.md' + +env: + APP_NAME: VSCodium + ASSETS_REPOSITORY: ${{ github.repository }}-insiders + BINARY_NAME: codium-insiders + GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'insider' }} + GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} + ORG_NAME: ${{ github.repository_owner }} + OS_NAME: windows + VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions + VSCODE_QUALITY: insider + +jobs: + check: + runs-on: ubuntu-latest + outputs: + MS_COMMIT: ${{ env.MS_COMMIT }} + MS_TAG: ${{ env.MS_TAG }} + RELEASE_VERSION: ${{ env.RELEASE_VERSION }} + SHOULD_BUILD: ${{ env.SHOULD_BUILD }} + SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + + - name: Clone VSCode repo + run: ./get_repo.sh + + - name: Check PR or cron + env: + GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} + run: ./check_cron_or_pr.sh + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHECK_ALL: 'yes' + run: ./check_tags.sh + + compile: + needs: + - check + runs-on: ubuntu-20.04 + env: + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} + VSCODE_ARCH: 'x64' + outputs: + BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + if: env.SHOULD_BUILD == 'yes' + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + + - name: Setup GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 10 + platform: x64 + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + if: env.SHOULD_BUILD == 'yes' + + - name: Install Yarn + run: npm install -g yarn + if: env.SHOULD_BUILD == 'yes' + + - name: Setup Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + if: env.SHOULD_BUILD == 'yes' + + - name: Install libkrb5-dev + run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev + if: env.SHOULD_BUILD == 'yes' + + - name: Clone VSCode repo + run: ./get_repo.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Build + env: + SHOULD_BUILD_REH: 'no' + SHOULD_BUILD_REH_WEB: 'no' + run: ./build.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Compress vscode artifact + run: | + find vscode -type f -not -path "*/node_modules/*" -not -path "vscode/.build/node/*" -not -path "vscode/.git/*" > vscode.txt + echo "vscode/.build/extensions/node_modules" >> vscode.txt + echo "vscode/.git" >> vscode.txt + tar -czf vscode.tar.gz -T vscode.txt + if: env.SHOULD_BUILD == 'yes' + + - name: Upload vscode artifact + uses: actions/upload-artifact@v4 + with: + name: vscode + path: ./vscode.tar.gz + retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }} + if: env.SHOULD_BUILD == 'yes' + + build: + needs: + - check + - compile + runs-on: windows-2019 + strategy: + fail-fast: false + matrix: + vscode_arch: + - x64 + - arm64 + defaults: + run: + shell: bash + env: + BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} + SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} + VSCODE_ARCH: ${{ matrix.vscode_arch }} + outputs: + RELEASE_VERSION: ${{ env.RELEASE_VERSION }} + SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + if: env.SHOULD_BUILD == 'yes' + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + if: env.SHOULD_BUILD == 'yes' + + - name: Install Yarn + run: npm install -g yarn + if: env.SHOULD_BUILD == 'yes' + + - name: Setup Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + if: env.SHOULD_BUILD == 'yes' + + - name: Check existing VSCodium tags/releases + env: + DISABLE_MSI: ${{ vars.DISABLE_INSIDER_MSI }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./check_tags.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Download vscode artifact + uses: actions/download-artifact@v4 + with: + name: vscode + if: env.SHOULD_BUILD == 'yes' + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + npm_config_arch: ${{ matrix.vscode_arch }} + npm_config_target_arch: ${{ matrix.vscode_arch }} + run: ./build/windows/package.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Prepare assets + run: ./prepare_assets.sh + if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Upload unsigned artifacts + id: upload-unsigned-artifacts + uses: actions/upload-artifact@v4 + with: + name: unsigned-${{ matrix.vscode_arch }} + path: | + assets/*.exe + assets/*.msi + retention-days: 1 + if: env.SHOULD_BUILD == 'yes' && vars.DISABLE_INSIDER_WINDOWS_SIGNING != 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Signing + uses: signpath/github-action-submit-signing-request@v1 + with: + api-token: ${{ secrets.SIGNPATH_API_TOKEN }} + organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }} + project-slug: ${{ secrets.SIGNPATH_PROJECT_SLUG }} + signing-policy-slug: ${{ secrets.SIGNPATH_POLICY_SLUG }} + github-artifact-id: ${{ steps.upload-unsigned-artifacts.outputs.artifact-id }} + artifact-configuration-slug: ${{ matrix.vscode_arch }} + wait-for-completion: true + # 3h to manually approve the request + wait-for-completion-timeout-in-seconds: 10800 + output-artifact-directory: assets/ + if: env.SHOULD_BUILD == 'yes' && vars.DISABLE_INSIDER_WINDOWS_SIGNING != 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Prepare checksums + run: ./prepare_checksums.sh + if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./release.sh + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Update versions repo + env: + FORCE_UPDATE: ${{ github.event.inputs.force_version }} + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./update_version.sh + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Upload assets + uses: actions/upload-artifact@v4 + with: + name: bin-${{ matrix.vscode_arch }} + path: assets/ + retention-days: 3 + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' + + winget: + needs: build + runs-on: windows-latest + defaults: + run: + shell: bash + env: + APP_IDENTIFIER: VSCodium.VSCodium.Insiders + ASSETS_REPOSITORY: vscodium-insiders + if: needs.build.outputs.SHOULD_DEPLOY == 'yes' + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Check version + run: ./stores/winget/check_version.sh + env: + RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }} + + - name: Release to WinGet + uses: vedantmgoyal9/winget-releaser@main + with: + identifier: ${{ env.APP_IDENTIFIER }} + version: ${{ env.RELEASE_VERSION }} + release-repository: ${{ env.ASSETS_REPOSITORY }} + release-tag: ${{ env.RELEASE_VERSION }}-insider + installers-regex: '\.exe$' # only .exe files + token: ${{ secrets.STRONGER_GITHUB_TOKEN }} + if: env.SHOULD_DEPLOY == 'yes' diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml new file mode 100644 index 00000000..7ea85c41 --- /dev/null +++ b/.github/workflows/lock.yml @@ -0,0 +1,16 @@ +name: Lock Issues + +on: + schedule: + - cron: '0 2 * * *' + +jobs: + lock: + runs-on: ubuntu-latest + steps: + - uses: dessant/lock-threads@v5 + with: + github-token: ${{ github.token }} + issue-inactive-days: '90' + pr-inactive-days: '90' + log-output: true diff --git a/.github/workflows/stable-linux.yml b/.github/workflows/stable-linux.yml new file mode 100644 index 00000000..41c6519a --- /dev/null +++ b/.github/workflows/stable-linux.yml @@ -0,0 +1,574 @@ +name: stable-linux + +on: + workflow_dispatch: + inputs: + force_version: + type: boolean + description: Force update version + generate_assets: + type: boolean + description: Generate assets + checkout_pr: + type: string + description: Checkout PR + repository_dispatch: + types: [stable] + push: + branches: [ master ] + paths-ignore: + - '**/*.md' + - 'upstream/*.json' + pull_request: + branches: [ master ] + paths-ignore: + - '**/*.md' + +env: + ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true + APP_NAME: VSCodium + ASSETS_REPOSITORY: ${{ github.repository }} + BINARY_NAME: codium + DISABLE_UPDATE: 'yes' + GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} + ORG_NAME: ${{ github.repository_owner }} + OS_NAME: linux + VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions + VSCODE_QUALITY: stable + +jobs: + check: + runs-on: ubuntu-latest + outputs: + MS_COMMIT: ${{ env.MS_COMMIT }} + MS_TAG: ${{ env.MS_TAG }} + RELEASE_VERSION: ${{ env.RELEASE_VERSION }} + SHOULD_BUILD: ${{ env.SHOULD_BUILD }} + SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + + - name: Clone VSCode repo + run: ./get_repo.sh + + - name: Check PR or cron + env: + GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} + run: ./check_cron_or_pr.sh + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHECK_ALL: 'yes' + run: ./check_tags.sh + + compile: + needs: + - check + runs-on: ubuntu-20.04 + env: + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} + VSCODE_ARCH: 'x64' + outputs: + BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + if: env.SHOULD_BUILD == 'yes' + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Setup GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 10 + platform: x64 + if: env.SHOULD_BUILD == 'yes' + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + if: env.SHOULD_BUILD == 'yes' + + - name: Install Yarn + run: npm install -g yarn + if: env.SHOULD_BUILD == 'yes' + + - name: Setup Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + if: env.SHOULD_BUILD == 'yes' + + - name: Install libkrb5-dev + run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev + if: env.SHOULD_BUILD == 'yes' + + - name: Clone VSCode repo + run: ./get_repo.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Build + env: + SHOULD_BUILD_REH: 'no' + SHOULD_BUILD_REH_WEB: 'no' + run: ./build.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Compress vscode artifact + run: | + find vscode -type f -not -path "*/node_modules/*" -not -path "vscode/.build/node/*" -not -path "vscode/.git/*" > vscode.txt + echo "vscode/.build/extensions/node_modules" >> vscode.txt + echo "vscode/.git" >> vscode.txt + tar -czf vscode.tar.gz -T vscode.txt + if: env.SHOULD_BUILD == 'yes' + + - name: Upload vscode artifact + uses: actions/upload-artifact@v4 + with: + name: vscode + path: ./vscode.tar.gz + retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }} + if: env.SHOULD_BUILD == 'yes' + + build: + needs: + - check + - compile + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - slug: X64 + vscode_arch: x64 + npm_arch: x64 + image: vscodium/vscodium-linux-build-agent:focal-x64 + - slug: ARM64 + vscode_arch: arm64 + npm_arch: arm64 + image: vscodium/vscodium-linux-build-agent:focal-arm64 + - slug: ARM32 + vscode_arch: armhf + npm_arch: arm + image: vscodium/vscodium-linux-build-agent:focal-armhf + - slug: RISCV64 + vscode_arch: riscv64 + npm_arch: riscv64 + image: vscodium/vscodium-linux-build-agent:focal-riscv64 + - slug: LOONG64 + vscode_arch: loong64 + npm_arch: loong64 + image: vscodium/vscodium-linux-build-agent:beige-loong64 + - slug: PPC64 + vscode_arch: ppc64le + npm_arch: ppc64 + image: vscodium/vscodium-linux-build-agent:focal-ppc64le + container: + image: ${{ matrix.image }} + env: + BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} + DISABLED: ${{ vars[format('DISABLE_STABLE_LINUX_APP_{0}', matrix.slug)] }} + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} + SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} + VSCODE_ARCH: ${{ matrix.vscode_arch }} + outputs: + RELEASE_VERSION: ${{ env.RELEASE_VERSION }} + SHOULD_BUILD: ${{ env.SHOULD_BUILD }} + SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + if: env.DISABLED != 'yes' + + - name: Install GH + run: ./install_gh.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Check existing VSCodium tags/releases + env: + CHECK_REH: 'no' + DISABLE_APPIMAGE: ${{ vars.DISABLE_STABLE_APPIMAGE }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./check_tags.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' + + - name: Install libkrb5-dev + run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' + + - name: Download vscode artifact + uses: actions/download-artifact@v4 + with: + name: vscode + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + npm_config_arch: ${{ matrix.npm_arch }} + run: ./build/linux/package_bin.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' + + - name: Prepare assets + env: + SHOULD_BUILD_REH: 'no' + SHOULD_BUILD_REH_WEB: 'no' + run: ./prepare_assets.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./release.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Update versions repo + env: + FORCE_UPDATE: ${{ github.event.inputs.force_version }} + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./update_version.sh + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Upload assets + uses: actions/upload-artifact@v4 + with: + name: bin-${{ matrix.vscode_arch }} + path: assets/ + retention-days: 3 + if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' + + reh_linux: + needs: + - check + - compile + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + include: + - slug: X64 + vscode_arch: x64 + npm_arch: x64 + - slug: ARM64 + vscode_arch: arm64 + npm_arch: arm64 + - slug: ARM32 + vscode_arch: armhf + npm_arch: arm + - slug: PPC64 + vscode_arch: ppc64le + npm_arch: ppc64 + - slug: RISCV64 + vscode_arch: riscv64 + npm_arch: riscv64 + - slug: LOONG64 + vscode_arch: loong64 + npm_arch: loong64 + - slug: S390X + vscode_arch: s390x + npm_arch: s390x + env: + BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} + DISABLED: ${{ vars[format('DISABLE_STABLE_LINUX_REH_{0}', matrix.slug)] }} + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }} + SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} + VSCODE_ARCH: ${{ matrix.vscode_arch }} + if: needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true' + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + if: env.DISABLED != 'yes' + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + if: env.DISABLED != 'yes' + + - name: Setup GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 10 + platform: x64 + if: env.DISABLED != 'yes' + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + if: env.DISABLED != 'yes' + + - name: Setup Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + if: env.DISABLED != 'yes' + + - name: Install libkrb5-dev + run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev + if: env.DISABLED != 'yes' + + - name: Install GH + run: ./install_gh.sh + if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHECK_ONLY_REH: 'yes' + run: ./check_tags.sh + if: env.DISABLED != 'yes' + + - name: Download vscode artifact + uses: actions/download-artifact@v4 + with: + name: vscode + if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + npm_config_arch: ${{ matrix.npm_arch }} + run: ./build/linux/package_reh.sh + if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./release.sh + if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no') + + - name: Upload assets + uses: actions/upload-artifact@v4 + with: + name: reh-linux-${{ matrix.vscode_arch }} + path: assets/ + retention-days: 3 + if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' + + reh_alpine: + needs: + - check + - compile + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + include: + - slug: X64 + vscode_arch: x64 + npm_arch: x64 + - slug: ARM64 + vscode_arch: arm64 + npm_arch: arm64 + env: + BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} + DISABLED: ${{ vars[format('DISABLE_STABLE_ALPINE_REH_{0}', matrix.slug)] }} + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + OS_NAME: alpine + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }} + SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} + VSCODE_ARCH: ${{ matrix.vscode_arch }} + if: needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true' + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + + - name: Setup GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 10 + platform: x64 + + - name: Install GH + run: ./install_gh.sh + if: env.SHOULD_DEPLOY == 'yes' + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHECK_ONLY_REH: 'yes' + run: ./check_tags.sh + + - name: Install libkrb5-dev + run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev + if: env.SHOULD_BUILD == 'yes' + + - name: Download vscode artifact + uses: actions/download-artifact@v4 + with: + name: vscode + if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + npm_config_arch: ${{ matrix.npm_arch }} + run: ./build/alpine/package_reh.sh + if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./release.sh + if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no') + + - name: Upload assets + uses: actions/upload-artifact@v4 + with: + name: reh-alpine-${{ matrix.vscode_arch }} + path: assets/ + retention-days: 3 + if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' + + aur: + needs: + - check + - build + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - package_name: vscodium + package_type: stable + # - package_name: vscodium-git + # package_type: rolling + if: needs.check.outputs.SHOULD_DEPLOY == 'yes' + + 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 }} + + snap: + needs: + - check + - build + runs-on: ubuntu-latest + env: + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SNAP_NAME: codium + strategy: + fail-fast: false + matrix: + platform: + - amd64 + - arm64 + if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && needs.check.outputs.SHOULD_BUILD_SNAP != 'no' && vars.DISABLE_STABLE_SNAP != 'yes' + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + + - name: Check version + env: + ARCHITECTURE: ${{ matrix.platform }} + GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} + SNAPCRAFT_STORE_CHANNEL: ${{ vars.SNAP_STORE_CHANNEL }} + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }} + run: ./stores/snapcraft/check_version.sh + + - uses: docker/setup-qemu-action@v3 + if: env.SHOULD_BUILD == 'yes' + + - uses: diddlesnaps/snapcraft-multiarch-action@v1 + with: + path: stores/snapcraft/stable + architecture: ${{ matrix.platform }} + id: build + if: env.SHOULD_BUILD == 'yes' + + - uses: diddlesnaps/snapcraft-review-action@v1 + with: + snap: ${{ steps.build.outputs.snap }} + isClassic: 'true' + if: env.SHOULD_DEPLOY_TO_RELEASE == 'yes' || env.SHOULD_DEPLOY_TO_STORE == 'yes' + + - uses: svenstaro/upload-release-action@v2 + with: + repo_name: ${{ env.ASSETS_REPOSITORY }} + repo_token: ${{ secrets.STRONGER_GITHUB_TOKEN }} + file: ${{ steps.build.outputs.snap }} + tag: ${{ env.RELEASE_VERSION }} + if: env.SHOULD_DEPLOY_TO_RELEASE == 'yes' + + - uses: snapcore/action-publish@master + env: + SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }} + with: + snap: ${{ steps.build.outputs.snap }} + release: ${{ vars.SNAP_STORE_CHANNEL }} + if: env.SHOULD_DEPLOY_TO_STORE == 'yes' + + deb-rpm-repo-hook: + needs: + - check + - build + runs-on: ubuntu-latest + if: needs.check.outputs.SHOULD_DEPLOY == 'yes' + + steps: + - name: Trigger repository rebuild + env: + GL_PAGES_TOKEN: ${{ secrets.GL_PAGES_TOKEN }} + run: curl -X POST --fail -F token="${GL_PAGES_TOKEN}" -F ref=master https://gitlab.com/api/v4/projects/8762263/trigger/pipeline diff --git a/.github/workflows/stable-macos.yml b/.github/workflows/stable-macos.yml new file mode 100644 index 00000000..2290f4b2 --- /dev/null +++ b/.github/workflows/stable-macos.yml @@ -0,0 +1,132 @@ +name: stable-macos + +on: + workflow_dispatch: + inputs: + force_version: + type: boolean + description: Force update version + generate_assets: + type: boolean + description: Generate assets + checkout_pr: + type: string + description: Checkout PR + repository_dispatch: + types: [stable] + push: + branches: [ master ] + paths-ignore: + - '**/*.md' + - 'upstream/*.json' + pull_request: + branches: [ master ] + paths-ignore: + - '**/*.md' + +env: + APP_NAME: VSCodium + ASSETS_REPOSITORY: ${{ github.repository }} + BINARY_NAME: codium + GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} + ORG_NAME: ${{ github.repository_owner }} + OS_NAME: osx + VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions + VSCODE_QUALITY: stable + +jobs: + build: + runs-on: ${{ matrix.runner }} + env: + VSCODE_ARCH: ${{ matrix.vscode_arch }} + strategy: + fail-fast: false + matrix: + include: + - runner: macos-13 + vscode_arch: x64 + - runner: [self-hosted, macOS, ARM64] + vscode_arch: arm64 + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: . get_pr.sh + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + + - name: Setup Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + if: env.VSCODE_ARCH == 'x64' + + - name: Clone VSCode repo + run: . get_repo.sh + + - name: Check PR or cron + env: + GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} + run: . check_cron_or_pr.sh + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: . check_tags.sh + if: env.SHOULD_DEPLOY == 'yes' + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./build.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Prepare assets + env: + CERTIFICATE_OSX_APP_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_APP_PASSWORD }} + CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_NEW_ID }} + CERTIFICATE_OSX_P12_DATA: ${{ secrets.CERTIFICATE_OSX_NEW_P12_DATA }} + CERTIFICATE_OSX_P12_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_P12_PASSWORD }} + CERTIFICATE_OSX_TEAM_ID: ${{ secrets.CERTIFICATE_OSX_NEW_TEAM_ID }} + run: ./prepare_assets.sh + if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./release.sh + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Update versions repo + env: + FORCE_UPDATE: ${{ github.event.inputs.force_version }} + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./update_version.sh + if: env.SHOULD_DEPLOY == 'yes' + + - name: Upload assets + uses: actions/upload-artifact@v4 + with: + name: bin-${{ matrix.vscode_arch }} + path: assets/ + retention-days: 3 + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' + + - name: Clean up keychain + if: always() + run: | + KEYCHAIN=$RUNNER_TEMP/build.keychain + + if [ -f "$KEYCHAIN" ]; + then + security delete-keychain $KEYCHAIN + fi diff --git a/.github/workflows/stable-spearhead.yml b/.github/workflows/stable-spearhead.yml new file mode 100644 index 00000000..b7d745ee --- /dev/null +++ b/.github/workflows/stable-spearhead.yml @@ -0,0 +1,85 @@ +name: stable-spearhead + +on: + workflow_dispatch: + inputs: + new_release: + type: boolean + description: Force new Release + force_dispatch: + type: boolean + description: Force dispatch + dont_update: + type: boolean + description: Don't update VSCode + schedule: + - cron: '0 18 * * *' + +jobs: + build: + runs-on: macos-14 + env: + APP_NAME: VSCodium + ASSETS_REPOSITORY: ${{ github.repository }} + BINARY_NAME: codium + GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} + ORG_NAME: ${{ github.repository_owner }} + OS_NAME: osx + VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions + VSCODE_ARCH: arm64 + VSCODE_LATEST: ${{ github.event.inputs.dont_update == 'true' && 'no' || 'yes' }} + VSCODE_QUALITY: stable + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + + - name: Clone VSCode repo + run: . get_repo.sh + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NEW_RELEASE: ${{ github.event.inputs.new_release }} + IS_SPEARHEAD: 'yes' + run: . check_tags.sh + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./build.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v6 + with: + gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} + passphrase: ${{ secrets.GPG_PASSPHRASE }} + git_user_signingkey: true + git_commit_gpgsign: true + if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true' + + - name: Update upstream version + run: ./update_upstream.sh + if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true' + + - name: Prepare source + run: ./prepare_src.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Release source + env: + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./release.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Dispatch builds + uses: peter-evans/repository-dispatch@v3 + with: + event-type: 'stable' + if: env.SHOULD_BUILD == 'yes' || github.event.inputs.force_dispatch == 'true' diff --git a/.github/workflows/stable-windows.yml b/.github/workflows/stable-windows.yml new file mode 100644 index 00000000..28931ec9 --- /dev/null +++ b/.github/workflows/stable-windows.yml @@ -0,0 +1,307 @@ +name: stable-windows + +on: + workflow_dispatch: + inputs: + force_version: + type: boolean + description: Force update version + generate_assets: + type: boolean + description: Generate assets + checkout_pr: + type: string + description: Checkout PR + repository_dispatch: + types: [stable] + push: + branches: [ master ] + paths-ignore: + - '**/*.md' + - 'upstream/*.json' + pull_request: + branches: [ master ] + paths-ignore: + - '**/*.md' + +env: + APP_NAME: VSCodium + ASSETS_REPOSITORY: ${{ github.repository }} + BINARY_NAME: codium + GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} + ORG_NAME: ${{ github.repository_owner }} + OS_NAME: windows + VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions + VSCODE_QUALITY: stable + +jobs: + check: + runs-on: ubuntu-latest + outputs: + MS_COMMIT: ${{ env.MS_COMMIT }} + MS_TAG: ${{ env.MS_TAG }} + RELEASE_VERSION: ${{ env.RELEASE_VERSION }} + SHOULD_BUILD: ${{ env.SHOULD_BUILD }} + SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + + - name: Clone VSCode repo + run: ./get_repo.sh + + - name: Check PR or cron + env: + GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} + run: ./check_cron_or_pr.sh + + - name: Check existing VSCodium tags/releases + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CHECK_ALL: 'yes' + run: ./check_tags.sh + + compile: + needs: + - check + runs-on: ubuntu-20.04 + env: + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} + VSCODE_ARCH: 'x64' + outputs: + BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + if: env.SHOULD_BUILD == 'yes' + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + + - name: Setup GCC + uses: egor-tensin/setup-gcc@v1 + with: + version: 10 + platform: x64 + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + if: env.SHOULD_BUILD == 'yes' + + - name: Install Yarn + run: npm install -g yarn + if: env.SHOULD_BUILD == 'yes' + + - name: Setup Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + if: env.SHOULD_BUILD == 'yes' + + - name: Install libkrb5-dev + run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev + if: env.SHOULD_BUILD == 'yes' + + - name: Clone VSCode repo + run: ./get_repo.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Build + env: + SHOULD_BUILD_REH: 'no' + SHOULD_BUILD_REH_WEB: 'no' + run: ./build.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Compress vscode artifact + run: | + find vscode -type f -not -path "*/node_modules/*" -not -path "vscode/.build/node/*" -not -path "vscode/.git/*" > vscode.txt + echo "vscode/.build/extensions/node_modules" >> vscode.txt + echo "vscode/.git" >> vscode.txt + tar -czf vscode.tar.gz -T vscode.txt + if: env.SHOULD_BUILD == 'yes' + + - name: Upload vscode artifact + uses: actions/upload-artifact@v4 + with: + name: vscode + path: ./vscode.tar.gz + retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }} + if: env.SHOULD_BUILD == 'yes' + + build: + needs: + - check + - compile + runs-on: windows-2019 + strategy: + fail-fast: false + matrix: + vscode_arch: + - x64 + - arm64 + defaults: + run: + shell: bash + env: + BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} + MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} + MS_TAG: ${{ needs.check.outputs.MS_TAG }} + RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} + SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} + SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} + VSCODE_ARCH: ${{ matrix.vscode_arch }} + outputs: + RELEASE_VERSION: ${{ env.RELEASE_VERSION }} + SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + if: env.SHOULD_BUILD == 'yes' + + - name: Switch to relevant branch + env: + PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} + run: ./get_pr.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Setup Node.js environment + uses: actions/setup-node@v4 + with: + node-version: '20.18.2' + if: env.SHOULD_BUILD == 'yes' + + - name: Install Yarn + run: npm install -g yarn + if: env.SHOULD_BUILD == 'yes' + + - name: Setup Python 3 + uses: actions/setup-python@v5 + with: + python-version: '3.11' + if: env.SHOULD_BUILD == 'yes' + + - name: Check existing VSCodium tags/releases + env: + DISABLE_MSI: ${{ vars.DISABLE_STABLE_MSI }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./check_tags.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Download vscode artifact + uses: actions/download-artifact@v4 + with: + name: vscode + if: env.SHOULD_BUILD == 'yes' + + - name: Build + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + npm_config_arch: ${{ matrix.vscode_arch }} + npm_config_target_arch: ${{ matrix.vscode_arch }} + run: ./build/windows/package.sh + if: env.SHOULD_BUILD == 'yes' + + - name: Prepare assets + run: ./prepare_assets.sh + if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Upload unsigned artifacts + id: upload-unsigned-artifacts + uses: actions/upload-artifact@v4 + with: + name: unsigned-${{ matrix.vscode_arch }} + path: | + assets/*.exe + assets/*.msi + retention-days: 1 + if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Signing + uses: signpath/github-action-submit-signing-request@v1 + with: + api-token: ${{ secrets.SIGNPATH_API_TOKEN }} + organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }} + project-slug: ${{ secrets.SIGNPATH_PROJECT_SLUG }} + signing-policy-slug: ${{ secrets.SIGNPATH_POLICY_SLUG }} + github-artifact-id: ${{ steps.upload-unsigned-artifacts.outputs.artifact-id }} + artifact-configuration-slug: ${{ matrix.vscode_arch }} + wait-for-completion: true + # 3h to manually approve the request + wait-for-completion-timeout-in-seconds: 10800 + output-artifact-directory: assets/ + if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Prepare checksums + run: ./prepare_checksums.sh + if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: ./release.sh + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Update versions repo + env: + FORCE_UPDATE: ${{ github.event.inputs.force_version }} + GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} + GITHUB_USERNAME: ${{ github.repository_owner }} + run: ./update_version.sh + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' + + - name: Upload assets + uses: actions/upload-artifact@v4 + with: + name: bin-${{ matrix.vscode_arch }} + path: assets/ + retention-days: 3 + if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' + + winget: + needs: build + runs-on: windows-latest + defaults: + run: + shell: bash + env: + APP_IDENTIFIER: VSCodium.VSCodium + if: needs.build.outputs.SHOULD_DEPLOY == 'yes' + + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ env.GITHUB_BRANCH }} + + - name: Check version + run: ./stores/winget/check_version.sh + env: + RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }} + + - name: Release to WinGet + uses: vedantmgoyal9/winget-releaser@main + with: + identifier: ${{ env.APP_IDENTIFIER }} + version: ${{ env.RELEASE_VERSION }} + release-tag: ${{ env.RELEASE_VERSION }} + installers-regex: '\.exe$' # only .exe files + token: ${{ secrets.STRONGER_GITHUB_TOKEN }} + if: env.SHOULD_DEPLOY == 'yes' diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 00000000..28d2f414 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,25 @@ +name: Stale Issues + +on: + schedule: + - cron: '0 1 * * *' + +permissions: + issues: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + days-before-stale: 180 + days-before-close: 30 + stale-issue-label: stale + operations-per-run: 1024 + stale-issue-message: > + This issue has been automatically marked as stale. **If this issue is still affecting you, please leave any comment**, and we'll keep it open. If you have any new additional information, please include it with your comment! + close-issue-message: > + This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue, please open a new issue. + exempt-issue-labels: discussion,never-stale + only-pr-labels: needs-information diff --git a/.github/workflows/void-build.yml b/.github/workflows/void-build.yml new file mode 100644 index 00000000..bdc32735 --- /dev/null +++ b/.github/workflows/void-build.yml @@ -0,0 +1,412 @@ +name: Build Void + +on: + push: + branches: [ main, release/*, github-workflow ] + pull_request: + branches: [ main ] + workflow_dispatch: + +jobs: + check-for-artifacts: + runs-on: ubuntu-latest + outputs: + linux-x64-exists: ${{ steps.check-artifacts.outputs.linux-x64-exists }} + linux-arm64-exists: ${{ steps.check-artifacts.outputs.linux-arm64-exists }} + win32-x64-exists: ${{ steps.check-artifacts.outputs.win32-x64-exists }} + win32-arm64-exists: ${{ steps.check-artifacts.outputs.win32-arm64-exists }} + darwin-x64-exists: ${{ steps.check-artifacts.outputs.darwin-x64-exists }} + darwin-arm64-exists: ${{ steps.check-artifacts.outputs.darwin-arm64-exists }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-linux-x64-min + + - name: Package + run: | + mkdir -p .build/linux/client + ARCHIVE_PATH=".build/linux/client/void-linux-x64.tar.gz" + tar -czf $ARCHIVE_PATH -C .. VSCode-linux-x64 + + - name: Generate checksum + run: | + cd .build/linux/client + sha256sum void-linux-x64.tar.gz > void-linux-x64.tar.gz.sha256 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-linux-x64 + path: | + .build/linux/client/void-linux-x64.tar.gz + .build/linux/client/void-linux-x64.tar.gz.sha256 + + build-linux-arm64: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-linux-arm64-min + + - name: Package + run: | + mkdir -p .build/linux/client + ARCHIVE_PATH=".build/linux/client/void-linux-arm64.tar.gz" + tar -czf $ARCHIVE_PATH -C .. VSCode-linux-arm64 + + - name: Generate checksum + run: | + cd .build/linux/client + sha256sum void-linux-arm64.tar.gz > void-linux-arm64.tar.gz.sha256 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-linux-arm64 + path: | + .build/linux/client/void-linux-arm64.tar.gz + .build/linux/client/void-linux-arm64.tar.gz.sha256 + + build-windows: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-win32-x64-min + + - name: Package + run: | + mkdir -p .build/win32-x64 + Compress-Archive -Path ..\VSCode-win32-x64\* -DestinationPath .build\win32-x64\void-win32-x64.zip + shell: pwsh + + - name: Generate checksum + run: | + cd .build/win32-x64 + $hash = Get-FileHash -Algorithm SHA256 void-win32-x64.zip + $hash.Hash | Out-File -Encoding ascii void-win32-x64.zip.sha256 + shell: pwsh + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-win32-x64 + path: | + .build/win32-x64/void-win32-x64.zip + .build/win32-x64/void-win32-x64.zip.sha256 + + build-windows-arm64: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + npm install + npm install -g node-gyp + npm install -g gulp-cli + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-win32-arm64-min + + - name: Package + run: | + mkdir -p .build/win32-arm64 + Compress-Archive -Path ..\VSCode-win32-arm64\* -DestinationPath .build\win32-arm64\void-win32-arm64.zip + shell: pwsh + + - name: Generate checksum + run: | + cd .build/win32-arm64 + $hash = Get-FileHash -Algorithm SHA256 void-win32-arm64.zip + $hash.Hash | Out-File -Encoding ascii void-win32-arm64.zip.sha256 + shell: pwsh + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: void-win32-arm64 + path: | + .build/win32-arm64/void-win32-arm64.zip + .build/win32-arm64/void-win32-arm64.zip.sha256 + + build-macos: + runs-on: macos-latest-large + strategy: + matrix: + arch: [arm64, x64] + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + + - name: Install dependencies + run: | + # Set npm config to use GitHub token for authentication to avoid rate limits + npm config set //github.com/:_authToken=${{ github.token }} + npm config set //api.github.com/:_authToken=${{ github.token }} + npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} + # Configure npm to use the GitHub token for all requests to github.com domains + npm config set @microsoft:registry https://npm.pkg.github.com + npm config set @vscode:registry https://npm.pkg.github.com + # Increase network timeout to handle slow connections + npm config set fetch-timeout 300000 + npm config set fetch-retry-mintimeout 20000 + npm config set fetch-retry-maxtimeout 120000 + npm install + npm install -g node-gyp + npm install -g gulp-cli + npm install -g create-dmg + + - name: Build + run: | + npm run buildreact + npm run gulp vscode-darwin-${{ matrix.arch }}-min + + - name: Create temporary working directory + run: | + WORKING_DIR="${{ runner.temp }}/VoidSign-${{ matrix.arch }}" + KEYCHAIN_DIR="${WORKING_DIR}/1_Keychain" + SIGN_DIR="${WORKING_DIR}/2_Signed" + mkdir -p "${WORKING_DIR}" "${KEYCHAIN_DIR}" "${SIGN_DIR}" + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + echo "WORKING_DIR=${WORKING_DIR}" >> $GITHUB_ENV + echo "KEYCHAIN_DIR=${KEYCHAIN_DIR}" >> $GITHUB_ENV + echo "SIGN_DIR=${SIGN_DIR}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP_DIR=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV + + - name: Import certificate + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + env: + P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} + P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} + KEYCHAIN_PASSWORD: "temporary-password" + run: | + KEYCHAIN="${KEYCHAIN_DIR}/buildagent.keychain" + echo "KEYCHAIN=${KEYCHAIN}" >> $GITHUB_ENV + + # Create a new keychain + security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" + security set-keychain-settings -lut 21600 "${KEYCHAIN}" + security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" + + # Import certificate + echo "${P12_BASE64}" | base64 --decode > "${KEYCHAIN_DIR}/certificate.p12" + security import "${KEYCHAIN_DIR}/certificate.p12" -k "${KEYCHAIN}" -P "${P12_PASSWORD}" -T /usr/bin/codesign + security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" > /dev/null + + # Add to keychain list + security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) + + - name: Sign Application + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + env: + CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} + VSCODE_ARCH: ${{ matrix.arch }} + run: | + export AGENT_TEMPDIRECTORY="${KEYCHAIN_DIR}" + cd $(pwd)/build/darwin + node sign.js "${SIGN_DIR}" + codesign --verify --verbose=4 "${SIGNED_DOTAPP}" + + - name: Create Unsigned App (for PR builds) + if: ${{ github.event_name == 'pull_request' || github.repository != 'voideditor/void' }} + run: | + cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" + echo "SIGNED_DOTAPP_DIR=$(pwd)/../VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV + echo "SIGNED_DOTAPP=$(pwd)/../VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV + + - name: Create DMG + run: | + cd "${SIGNED_DOTAPP_DIR}" + npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . || true + GENERATED_DMG=$(ls *.dmg) + mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" + + if [[ "${{ github.event_name }}" != "pull_request" && "${{ github.repository }}" == "voideditor/void" ]]; then + codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" + fi + + echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV + + - name: Notarize + if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} + env: + APPLE_ID: ${{ secrets.APPLE_ID }} + TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} + APP_PASSWORD: ${{ secrets.APPLE_APP_PWD }} + KEYCHAIN_PASSWORD: "temporary-password" + run: | + # Store credentials for notarization + xcrun notarytool store-credentials "Void" \ + --apple-id "${APPLE_ID}" \ + --team-id "${TEAM_ID}" \ + --password "${APP_PASSWORD}" \ + --keychain "${KEYCHAIN}" + + # Submit for notarization with a timeout + xcrun notarytool submit "${SIGNED_DMG}" \ + --keychain-profile "Void" \ + --keychain "${KEYCHAIN}" \ + --wait --timeout 2h + + # Staple the notarization ticket + xcrun stapler staple "${SIGNED_DMG}" + + - name: Create Raw App Archive + run: | + cd "${SIGNED_DOTAPP_DIR}" + VOIDAPP=$(basename "${SIGNED_DOTAPP}") + ditto -c -k --sequesterRsrc --keepParent "${VOIDAPP}" "Void-RawApp-darwin-${{ matrix.arch }}.zip" + + - name: Generate Hash File + run: | + cd "${SIGNED_DOTAPP_DIR}" + SHA1=$(shasum -a 1 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) + SHA256=$(shasum -a 256 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) + TIMESTAMP=$(date +%s) + + cat > "Void-UpdJSON-darwin-${{ matrix.arch }}.json" << EOF + { + "sha256hash": "${SHA256}", + "hash": "${SHA1}", + "timestamp": ${TIMESTAMP} + } + EOF + + - name: Generate checksum for DMG + run: | + cd "${SIGNED_DOTAPP_DIR}" + shasum -a 256 "Void-Installer-darwin-${{ matrix.arch }}.dmg" > "Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256" + + - name: Upload DMG + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-dmg + path: | + ${{ env.SIGNED_DMG }} + ${{ env.SIGNED_DOTAPP_DIR }}/Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256 + + - name: Upload Raw App + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-rawapp + path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-RawApp-darwin-${{ matrix.arch }}.zip + + - name: Upload Hash File + uses: actions/upload-artifact@v4 + with: + name: void-darwin-${{ matrix.arch }}-hash + path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json + From 9e177c73ca2e4e99be95601c3f1f939dedb25393 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Tue, 25 Mar 2025 20:08:02 -0700 Subject: [PATCH 52/54] + --- .github/workflows/build.yml | 405 ------------------------------- .github/workflows/void-build.yml | 9 +- 2 files changed, 1 insertion(+), 413 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 379ba257..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,405 +0,0 @@ -name: Build Void - -on: - push: - branches: [ main, release/*, github-workflow ] - pull_request: - branches: [ main ] - workflow_dispatch: - -jobs: - build-linux: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-linux-x64-min - - - name: Package - run: | - mkdir -p .build/linux/client - ARCHIVE_PATH=".build/linux/client/void-linux-x64.tar.gz" - tar -czf $ARCHIVE_PATH -C .. VSCode-linux-x64 - - - name: Generate checksum - run: | - cd .build/linux/client - sha256sum void-linux-x64.tar.gz > void-linux-x64.tar.gz.sha256 - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-linux-x64 - path: | - .build/linux/client/void-linux-x64.tar.gz - .build/linux/client/void-linux-x64.tar.gz.sha256 - - build-linux-arm64: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-linux-arm64-min - - - name: Package - run: | - mkdir -p .build/linux/client - ARCHIVE_PATH=".build/linux/client/void-linux-arm64.tar.gz" - tar -czf $ARCHIVE_PATH -C .. VSCode-linux-arm64 - - - name: Generate checksum - run: | - cd .build/linux/client - sha256sum void-linux-arm64.tar.gz > void-linux-arm64.tar.gz.sha256 - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-linux-arm64 - path: | - .build/linux/client/void-linux-arm64.tar.gz - .build/linux/client/void-linux-arm64.tar.gz.sha256 - - build-windows: - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-win32-x64-min - - - name: Package - run: | - mkdir -p .build/win32-x64 - Compress-Archive -Path ..\VSCode-win32-x64\* -DestinationPath .build\win32-x64\void-win32-x64.zip - shell: pwsh - - - name: Generate checksum - run: | - cd .build/win32-x64 - $hash = Get-FileHash -Algorithm SHA256 void-win32-x64.zip - $hash.Hash | Out-File -Encoding ascii void-win32-x64.zip.sha256 - shell: pwsh - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-win32-x64 - path: | - .build/win32-x64/void-win32-x64.zip - .build/win32-x64/void-win32-x64.zip.sha256 - - build-windows-arm64: - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-win32-arm64-min - - - name: Package - run: | - mkdir -p .build/win32-arm64 - Compress-Archive -Path ..\VSCode-win32-arm64\* -DestinationPath .build\win32-arm64\void-win32-arm64.zip - shell: pwsh - - - name: Generate checksum - run: | - cd .build/win32-arm64 - $hash = Get-FileHash -Algorithm SHA256 void-win32-arm64.zip - $hash.Hash | Out-File -Encoding ascii void-win32-arm64.zip.sha256 - shell: pwsh - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-win32-arm64 - path: | - .build/win32-arm64/void-win32-arm64.zip - .build/win32-arm64/void-win32-arm64.zip.sha256 - - build-macos: - runs-on: macos-latest-large - strategy: - matrix: - arch: [arm64, x64] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm install - npm install -g node-gyp - npm install -g gulp-cli - npm install -g create-dmg - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-darwin-${{ matrix.arch }}-min - - - name: Create temporary working directory - run: | - WORKING_DIR="${{ runner.temp }}/VoidSign-${{ matrix.arch }}" - KEYCHAIN_DIR="${WORKING_DIR}/1_Keychain" - SIGN_DIR="${WORKING_DIR}/2_Signed" - mkdir -p "${WORKING_DIR}" "${KEYCHAIN_DIR}" "${SIGN_DIR}" - cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" - echo "WORKING_DIR=${WORKING_DIR}" >> $GITHUB_ENV - echo "KEYCHAIN_DIR=${KEYCHAIN_DIR}" >> $GITHUB_ENV - echo "SIGN_DIR=${SIGN_DIR}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP_DIR=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - - - name: Import certificate - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} - env: - P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} - P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} - KEYCHAIN_PASSWORD: "temporary-password" - run: | - KEYCHAIN="${KEYCHAIN_DIR}/buildagent.keychain" - echo "KEYCHAIN=${KEYCHAIN}" >> $GITHUB_ENV - - # Create a new keychain - security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" - security set-keychain-settings -lut 21600 "${KEYCHAIN}" - security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" - - # Import certificate - echo "${P12_BASE64}" | base64 --decode > "${KEYCHAIN_DIR}/certificate.p12" - security import "${KEYCHAIN_DIR}/certificate.p12" -k "${KEYCHAIN}" -P "${P12_PASSWORD}" -T /usr/bin/codesign - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" > /dev/null - - # Add to keychain list - security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) - - - name: Sign Application - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} - env: - CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} - VSCODE_ARCH: ${{ matrix.arch }} - run: | - export AGENT_TEMPDIRECTORY="${KEYCHAIN_DIR}" - cd $(pwd)/build/darwin - node sign.js "${SIGN_DIR}" - codesign --verify --verbose=4 "${SIGNED_DOTAPP}" - - - name: Create Unsigned App (for PR builds) - if: ${{ github.event_name == 'pull_request' || github.repository != 'voideditor/void' }} - run: | - cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" - echo "SIGNED_DOTAPP_DIR=$(pwd)/../VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP=$(pwd)/../VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - - - name: Create DMG - run: | - cd "${SIGNED_DOTAPP_DIR}" - npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . || true - GENERATED_DMG=$(ls *.dmg) - mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" - - if [[ "${{ github.event_name }}" != "pull_request" && "${{ github.repository }}" == "voideditor/void" ]]; then - codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" - fi - - echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV - - - name: Notarize - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} - env: - APPLE_ID: ${{ secrets.APPLE_ID }} - TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - APP_PASSWORD: ${{ secrets.APPLE_APP_PWD }} - KEYCHAIN_PASSWORD: "temporary-password" - run: | - # Store credentials for notarization - xcrun notarytool store-credentials "Void" \ - --apple-id "${APPLE_ID}" \ - --team-id "${TEAM_ID}" \ - --password "${APP_PASSWORD}" \ - --keychain "${KEYCHAIN}" - - # Submit for notarization with a timeout - xcrun notarytool submit "${SIGNED_DMG}" \ - --keychain-profile "Void" \ - --keychain "${KEYCHAIN}" \ - --wait --timeout 2h - - # Staple the notarization ticket - xcrun stapler staple "${SIGNED_DMG}" - - - name: Create Raw App Archive - run: | - cd "${SIGNED_DOTAPP_DIR}" - VOIDAPP=$(basename "${SIGNED_DOTAPP}") - ditto -c -k --sequesterRsrc --keepParent "${VOIDAPP}" "Void-RawApp-darwin-${{ matrix.arch }}.zip" - - - name: Generate Hash File - run: | - cd "${SIGNED_DOTAPP_DIR}" - SHA1=$(shasum -a 1 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) - SHA256=$(shasum -a 256 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) - TIMESTAMP=$(date +%s) - - cat > "Void-UpdJSON-darwin-${{ matrix.arch }}.json" << EOF - { - "sha256hash": "${SHA256}", - "hash": "${SHA1}", - "timestamp": ${TIMESTAMP} - } - EOF - - - name: Generate checksum for DMG - run: | - cd "${SIGNED_DOTAPP_DIR}" - shasum -a 256 "Void-Installer-darwin-${{ matrix.arch }}.dmg" > "Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256" - - - name: Upload DMG - uses: actions/upload-artifact@v4 - with: - name: void-darwin-${{ matrix.arch }}-dmg - path: | - ${{ env.SIGNED_DMG }} - ${{ env.SIGNED_DOTAPP_DIR }}/Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256 - - - name: Upload Raw App - uses: actions/upload-artifact@v4 - with: - name: void-darwin-${{ matrix.arch }}-rawapp - path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-RawApp-darwin-${{ matrix.arch }}.zip - - - name: Upload Hash File - uses: actions/upload-artifact@v4 - with: - name: void-darwin-${{ matrix.arch }}-hash - path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json - diff --git a/.github/workflows/void-build.yml b/.github/workflows/void-build.yml index bdc32735..379ba257 100644 --- a/.github/workflows/void-build.yml +++ b/.github/workflows/void-build.yml @@ -8,15 +8,8 @@ on: workflow_dispatch: jobs: - check-for-artifacts: + build-linux: runs-on: ubuntu-latest - outputs: - linux-x64-exists: ${{ steps.check-artifacts.outputs.linux-x64-exists }} - linux-arm64-exists: ${{ steps.check-artifacts.outputs.linux-arm64-exists }} - win32-x64-exists: ${{ steps.check-artifacts.outputs.win32-x64-exists }} - win32-arm64-exists: ${{ steps.check-artifacts.outputs.win32-arm64-exists }} - darwin-x64-exists: ${{ steps.check-artifacts.outputs.darwin-x64-exists }} - darwin-arm64-exists: ${{ steps.check-artifacts.outputs.darwin-arm64-exists }} steps: - name: Checkout uses: actions/checkout@v3 From 4e56321eb9240fe3fc7f85bddbbd78bd109c1632 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Tue, 25 Mar 2025 20:11:35 -0700 Subject: [PATCH 53/54] update --- .../{insider-linux.yml => _insider-linux.yml} | 0 .../{insider-macos.yml => _insider-macos.yml} | 0 ...r-spearhead.yml => _insider-spearhead.yml} | 0 ...sider-windows.yml => _insider-windows.yml} | 0 .github/workflows/{lock.yml => _lock.yml} | 0 .github/workflows/{stale.yml => _stale.yml} | 0 .github/workflows/stable-linux.yml | 2 +- .github/workflows/stable-macos.yml | 2 +- .github/workflows/test.yml | 131 ------------------ 9 files changed, 2 insertions(+), 133 deletions(-) rename .github/workflows/{insider-linux.yml => _insider-linux.yml} (100%) rename .github/workflows/{insider-macos.yml => _insider-macos.yml} (100%) rename .github/workflows/{insider-spearhead.yml => _insider-spearhead.yml} (100%) rename .github/workflows/{insider-windows.yml => _insider-windows.yml} (100%) rename .github/workflows/{lock.yml => _lock.yml} (100%) rename .github/workflows/{stale.yml => _stale.yml} (100%) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/insider-linux.yml b/.github/workflows/_insider-linux.yml similarity index 100% rename from .github/workflows/insider-linux.yml rename to .github/workflows/_insider-linux.yml diff --git a/.github/workflows/insider-macos.yml b/.github/workflows/_insider-macos.yml similarity index 100% rename from .github/workflows/insider-macos.yml rename to .github/workflows/_insider-macos.yml diff --git a/.github/workflows/insider-spearhead.yml b/.github/workflows/_insider-spearhead.yml similarity index 100% rename from .github/workflows/insider-spearhead.yml rename to .github/workflows/_insider-spearhead.yml diff --git a/.github/workflows/insider-windows.yml b/.github/workflows/_insider-windows.yml similarity index 100% rename from .github/workflows/insider-windows.yml rename to .github/workflows/_insider-windows.yml diff --git a/.github/workflows/lock.yml b/.github/workflows/_lock.yml similarity index 100% rename from .github/workflows/lock.yml rename to .github/workflows/_lock.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/_stale.yml similarity index 100% rename from .github/workflows/stale.yml rename to .github/workflows/_stale.yml diff --git a/.github/workflows/stable-linux.yml b/.github/workflows/stable-linux.yml index 41c6519a..c191f34a 100644 --- a/.github/workflows/stable-linux.yml +++ b/.github/workflows/stable-linux.yml @@ -15,7 +15,7 @@ on: repository_dispatch: types: [stable] push: - branches: [ master ] + branches: [ master, github-workflow ] paths-ignore: - '**/*.md' - 'upstream/*.json' diff --git a/.github/workflows/stable-macos.yml b/.github/workflows/stable-macos.yml index 2290f4b2..1b3563a3 100644 --- a/.github/workflows/stable-macos.yml +++ b/.github/workflows/stable-macos.yml @@ -15,7 +15,7 @@ on: repository_dispatch: types: [stable] push: - branches: [ master ] + branches: [ master, github-workflow ] paths-ignore: - '**/*.md' - 'upstream/*.json' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 3ac12e9b..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,131 +0,0 @@ -name: Create Universal MacOS - -on: - push: - branches: [ main, release/*, github-workflow ] - pull_request: - branches: [ main ] - workflow_dispatch: - -jobs: - create-universal-macos: - runs-on: macos-latest-large - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Download x64 DMG - uses: actions/download-artifact@v4 - with: - name: void-darwin-x64-dmg - path: .build/darwin-x64 - - - name: Download arm64 DMG - uses: actions/download-artifact@v4 - with: - name: void-darwin-arm64-dmg - path: .build/darwin-arm64 - - - name: Download x64 App - uses: actions/download-artifact@v4 - with: - name: void-darwin-x64-rawapp - path: .build/darwin-x64-app - - - name: Download arm64 App - uses: actions/download-artifact@v4 - with: - name: void-darwin-arm64-rawapp - path: .build/darwin-arm64-app - - - name: Create Universal App working dir - run: | - mkdir -p .build/darwin-universal/{x64,arm64,universal} - - - name: Extract Apps - run: | - unzip -o .build/darwin-x64-app/Void-RawApp-darwin-x64.zip -d .build/darwin-universal/x64 - unzip -o .build/darwin-arm64-app/Void-RawApp-darwin-arm64.zip -d .build/darwin-universal/arm64 - - - name: Install dependencies for universal app - run: | - cd build/ - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - - npm install - npm install -g create-dmg - npm run compile - - - - name: Create Universal App - run: | - # Script to create universal binary - cd build/darwin - node create-universal-app.js \ - "$(pwd)/../../.build/darwin-universal/arm64/Void.app" \ - "$(pwd)/../../.build/darwin-universal/x64/Void.app" \ - "$(pwd)/../../.build/darwin-universal/universal/Void.app" - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - - - name: Create Universal DMG - run: | - cd .build/darwin-universal/universal - create-dmg --volname "Void Installer" Void.app . || true - GENERATED_DMG=$(ls *.dmg) - mv "${GENERATED_DMG}" "../../Void-Installer-darwin-universal.dmg" - cd ../.. - shasum -a 256 Void-Installer-darwin-universal.dmg > Void-Installer-darwin-universal.dmg.sha256 - - - name: Upload Universal DMG - uses: actions/upload-artifact@v4 - with: - name: void-darwin-universal - path: | - .build/Void-Installer-darwin-universal.dmg - .build/Void-Installer-darwin-universal.dmg.sha256 - - create-release: - needs: [create-universal-macos] - runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') - steps: - - name: Download all artifacts - uses: actions/download-artifact@v4 - with: - path: release-artifacts - - - name: Create GitHub Release - uses: softprops/action-gh-release@v1 - with: - files: | - release-artifacts/void-linux-x64/void-linux-x64.tar.gz - release-artifacts/void-linux-x64/void-linux-x64.tar.gz.sha256 - release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz - release-artifacts/void-linux-arm64/void-linux-arm64.tar.gz.sha256 - release-artifacts/void-win32-x64/void-win32-x64.zip - release-artifacts/void-win32-x64/void-win32-x64.zip.sha256 - release-artifacts/void-win32-arm64/void-win32-arm64.zip - release-artifacts/void-win32-arm64/void-win32-arm64.zip.sha256 - release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg - release-artifacts/void-darwin-x64-dmg/Void-Installer-darwin-x64.dmg.sha256 - release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg - release-artifacts/void-darwin-arm64-dmg/Void-Installer-darwin-arm64.dmg.sha256 - release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg - release-artifacts/void-darwin-universal/Void-Installer-darwin-universal.dmg.sha256 - draft: true - generate_release_notes: true From e07727393b7c32b351ea2ba7d071d14a7a61474c Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Wed, 26 Mar 2025 14:55:08 -0700 Subject: [PATCH 54/54] rm workflows, move to its own dir --- .github/workflows/_insider-linux.yml | 543 --------------------- .github/workflows/_insider-macos.yml | 134 ------ .github/workflows/_insider-spearhead.yml | 90 ---- .github/workflows/_insider-windows.yml | 311 ------------ .github/workflows/_lock.yml | 16 - .github/workflows/_stale.yml | 25 - .github/workflows/stable-linux.yml | 574 ----------------------- .github/workflows/stable-macos.yml | 132 ------ .github/workflows/stable-spearhead.yml | 85 ---- .github/workflows/stable-windows.yml | 307 ------------ .github/workflows/void-build.yml | 405 ---------------- 11 files changed, 2622 deletions(-) delete mode 100644 .github/workflows/_insider-linux.yml delete mode 100644 .github/workflows/_insider-macos.yml delete mode 100644 .github/workflows/_insider-spearhead.yml delete mode 100644 .github/workflows/_insider-windows.yml delete mode 100644 .github/workflows/_lock.yml delete mode 100644 .github/workflows/_stale.yml delete mode 100644 .github/workflows/stable-linux.yml delete mode 100644 .github/workflows/stable-macos.yml delete mode 100644 .github/workflows/stable-spearhead.yml delete mode 100644 .github/workflows/stable-windows.yml delete mode 100644 .github/workflows/void-build.yml diff --git a/.github/workflows/_insider-linux.yml b/.github/workflows/_insider-linux.yml deleted file mode 100644 index a9e9cc95..00000000 --- a/.github/workflows/_insider-linux.yml +++ /dev/null @@ -1,543 +0,0 @@ -name: insider-linux - -on: - workflow_dispatch: - inputs: - force_version: - type: boolean - description: Force update version - generate_assets: - type: boolean - description: Generate assets - checkout_pr: - type: string - description: Checkout PR - repository_dispatch: - types: [insider] - push: - branches: [ insider ] - paths-ignore: - - '**/*.md' - - 'upstream/*.json' - pull_request: - branches: [ insider ] - paths-ignore: - - '**/*.md' - -env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - APP_NAME: VSCodium - ASSETS_REPOSITORY: ${{ github.repository }}-insiders - BINARY_NAME: codium-insiders - DISABLE_UPDATE: 'yes' - GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} - GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'insider' }} - ORG_NAME: ${{ github.repository_owner }} - OS_NAME: linux - VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions - VSCODE_QUALITY: insider - -jobs: - check: - runs-on: ubuntu-latest - outputs: - MS_COMMIT: ${{ env.MS_COMMIT }} - MS_TAG: ${{ env.MS_TAG }} - RELEASE_VERSION: ${{ env.RELEASE_VERSION }} - SHOULD_BUILD: ${{ env.SHOULD_BUILD }} - SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - - - name: Clone VSCode repo - run: ./get_repo.sh - - - name: Check PR or cron - env: - GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} - run: ./check_cron_or_pr.sh - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CHECK_ALL: 'yes' - run: ./check_tags.sh - - compile: - needs: - - check - runs-on: ubuntu-20.04 - env: - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} - VSCODE_ARCH: 'x64' - outputs: - BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - if: env.SHOULD_BUILD == 'yes' - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - - - name: Setup GCC - uses: egor-tensin/setup-gcc@v1 - with: - version: 10 - platform: x64 - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - if: env.SHOULD_BUILD == 'yes' - - - name: Install Yarn - run: npm install -g yarn - if: env.SHOULD_BUILD == 'yes' - - - name: Setup Python 3 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - if: env.SHOULD_BUILD == 'yes' - - - name: Install libkrb5-dev - run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev - if: env.SHOULD_BUILD == 'yes' - - - name: Clone VSCode repo - run: ./get_repo.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Build - env: - SHOULD_BUILD_REH: 'no' - SHOULD_BUILD_REH_WEB: 'no' - run: ./build.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Compress vscode artifact - run: | - find vscode -type f -not -path "*/node_modules/*" -not -path "vscode/.build/node/*" -not -path "vscode/.git/*" > vscode.txt - echo "vscode/.build/extensions/node_modules" >> vscode.txt - echo "vscode/.git" >> vscode.txt - tar -czf vscode.tar.gz -T vscode.txt - if: env.SHOULD_BUILD == 'yes' - - - name: Upload vscode artifact - uses: actions/upload-artifact@v4 - with: - name: vscode - path: ./vscode.tar.gz - retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }} - if: env.SHOULD_BUILD == 'yes' - - build: - needs: - - check - - compile - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - slug: X64 - vscode_arch: x64 - npm_arch: x64 - image: vscodium/vscodium-linux-build-agent:focal-x64 - - slug: ARM64 - vscode_arch: arm64 - npm_arch: arm64 - image: vscodium/vscodium-linux-build-agent:focal-arm64 - - slug: ARM32 - vscode_arch: armhf - npm_arch: arm - image: vscodium/vscodium-linux-build-agent:focal-armhf - - slug: RISCV64 - vscode_arch: riscv64 - npm_arch: riscv64 - image: vscodium/vscodium-linux-build-agent:focal-riscv64 - - slug: LOONG64 - vscode_arch: loong64 - npm_arch: loong64 - image: vscodium/vscodium-linux-build-agent:beige-loong64 - - slug: PPC64 - vscode_arch: ppc64le - npm_arch: ppc64 - image: vscodium/vscodium-linux-build-agent:focal-ppc64le - container: - image: ${{ matrix.image }} - env: - BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} - DISABLED: ${{ vars[format('DISABLE_INSIDER_LINUX_APP_{0}', matrix.slug)] }} - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} - SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} - VSCODE_ARCH: ${{ matrix.vscode_arch }} - outputs: - RELEASE_VERSION: ${{ env.RELEASE_VERSION }} - SHOULD_BUILD: ${{ env.SHOULD_BUILD }} - SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' - - - name: Install GH - run: ./install_gh.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Check existing VSCodium tags/releases - env: - CHECK_REH: 'no' - DISABLE_APPIMAGE: ${{ vars.DISABLE_INSIDER_APPIMAGE }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./check_tags.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' - - - name: Install libkrb5-dev - run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' - - - name: Download vscode artifact - uses: actions/download-artifact@v4 - with: - name: vscode - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - npm_config_arch: ${{ matrix.npm_arch }} - run: ./build/linux/package_bin.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' - - - name: Prepare assets - env: - SHOULD_BUILD_REH: 'no' - SHOULD_BUILD_REH_WEB: 'no' - run: ./prepare_assets.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./release.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Update versions repo - env: - FORCE_UPDATE: ${{ github.event.inputs.force_version }} - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./update_version.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Upload assets - uses: actions/upload-artifact@v4 - with: - name: bin-${{ matrix.vscode_arch }} - path: assets/ - retention-days: 3 - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' - - reh_linux: - needs: - - check - - compile - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - include: - - slug: X64 - vscode_arch: x64 - npm_arch: x64 - - slug: ARM64 - vscode_arch: arm64 - npm_arch: arm64 - - slug: ARM32 - vscode_arch: armhf - npm_arch: arm - - slug: PPC64 - vscode_arch: ppc64le - npm_arch: ppc64 - - slug: RISCV64 - vscode_arch: riscv64 - npm_arch: riscv64 - - slug: LOONG64 - vscode_arch: loong64 - npm_arch: loong64 - - slug: S390X - vscode_arch: s390x - npm_arch: s390x - env: - BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} - DISABLED: ${{ vars[format('DISABLE_INSIDER_LINUX_REH_{0}', matrix.slug)] }} - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }} - SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} - VSCODE_ARCH: ${{ matrix.vscode_arch }} - if: needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true' - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - if: env.DISABLED != 'yes' - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - if: env.DISABLED != 'yes' - - - name: Setup GCC - uses: egor-tensin/setup-gcc@v1 - with: - version: 10 - platform: x64 - if: env.DISABLED != 'yes' - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - if: env.DISABLED != 'yes' - - - name: Setup Python 3 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - if: env.DISABLED != 'yes' - - - name: Install libkrb5-dev - run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev - if: env.DISABLED != 'yes' - - - name: Install GH - run: ./install_gh.sh - if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CHECK_ONLY_REH: 'yes' - run: ./check_tags.sh - if: env.DISABLED != 'yes' - - - name: Download vscode artifact - uses: actions/download-artifact@v4 - with: - name: vscode - if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - npm_config_arch: ${{ matrix.npm_arch }} - run: ./build/linux/package_reh.sh - if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./release.sh - if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no') - - - name: Upload assets - uses: actions/upload-artifact@v4 - with: - name: reh-linux-${{ matrix.vscode_arch }} - path: assets/ - retention-days: 3 - if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' - - reh_alpine: - needs: - - check - - compile - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - include: - - slug: X64 - vscode_arch: x64 - npm_arch: x64 - - slug: ARM64 - vscode_arch: arm64 - npm_arch: arm64 - env: - BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} - DISABLED: ${{ vars[format('DISABLE_INSIDER_ALPINE_REH_{0}', matrix.slug)] }} - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - OS_NAME: alpine - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }} - SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} - VSCODE_ARCH: ${{ matrix.vscode_arch }} - if: needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true' - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - - - name: Setup GCC - uses: egor-tensin/setup-gcc@v1 - with: - version: 10 - platform: x64 - - - name: Install GH - run: ./install_gh.sh - if: env.SHOULD_DEPLOY == 'yes' - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CHECK_ONLY_REH: 'yes' - run: ./check_tags.sh - - - name: Install libkrb5-dev - run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev - if: env.SHOULD_BUILD == 'yes' - - - name: Download vscode artifact - uses: actions/download-artifact@v4 - with: - name: vscode - if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - npm_config_arch: ${{ matrix.npm_arch }} - run: ./build/alpine/package_reh.sh - if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./release.sh - if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no') - - - name: Upload assets - uses: actions/upload-artifact@v4 - with: - name: reh-alpine-${{ matrix.vscode_arch }} - path: assets/ - retention-days: 3 - if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' - - aur: - needs: - - check - - build - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - package_name: vscodium-insiders-bin - - package_name: vscodium-insiders - if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && github.event.inputs.generate_assets != 'true' - - steps: - - name: Get version - env: - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - run: echo "PACKAGE_VERSION=${RELEASE_VERSION/-*/}" >> "${GITHUB_ENV}" - - - name: Publish ${{ matrix.package_name }} - uses: zokugun/github-actions-aur-releaser@v1 - with: - package_name: ${{ matrix.package_name }} - package_version: ${{ env.PACKAGE_VERSION }} - aur_private_key: ${{ secrets.AUR_PRIVATE_KEY }} - aur_username: ${{ secrets.AUR_USERNAME }} - aur_email: ${{ secrets.AUR_EMAIL }} - - snap: - needs: - - check - - build - runs-on: ubuntu-latest - env: - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SNAP_NAME: codium-insiders - strategy: - fail-fast: false - matrix: - platform: - - amd64 - - arm64 - if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && needs.check.outputs.SHOULD_BUILD_SNAP != 'no' && vars.DISABLE_INSIDER_SNAP != 'yes' - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - - - uses: docker/setup-qemu-action@v3 - - - uses: diddlesnaps/snapcraft-multiarch-action@v1 - with: - path: stores/snapcraft/insider - architecture: ${{ matrix.platform }} - id: build - - - uses: diddlesnaps/snapcraft-review-action@v1 - with: - snap: ${{ steps.build.outputs.snap }} - isClassic: 'true' - - - uses: svenstaro/upload-release-action@v2 - with: - repo_name: ${{ env.ASSETS_REPOSITORY }} - repo_token: ${{ secrets.STRONGER_GITHUB_TOKEN }} - file: ${{ steps.build.outputs.snap }} - tag: ${{ env.RELEASE_VERSION }} diff --git a/.github/workflows/_insider-macos.yml b/.github/workflows/_insider-macos.yml deleted file mode 100644 index e8751c77..00000000 --- a/.github/workflows/_insider-macos.yml +++ /dev/null @@ -1,134 +0,0 @@ -name: insider-macos - -on: - workflow_dispatch: - inputs: - force_version: - type: boolean - description: Force update version - generate_assets: - type: boolean - description: Generate assets - checkout_pr: - type: string - description: Checkout PR - repository_dispatch: - types: [insider] - push: - branches: [ insider ] - paths-ignore: - - '**/*.md' - - 'upstream/*.json' - pull_request: - branches: [ insider ] - paths-ignore: - - '**/*.md' - -env: - APP_NAME: VSCodium - ASSETS_REPOSITORY: ${{ github.repository }}-insiders - BINARY_NAME: codium-insiders - GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'insider' }} - GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} - ORG_NAME: ${{ github.repository_owner }} - OS_NAME: osx - VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions - VSCODE_QUALITY: insider - -jobs: - build: - runs-on: ${{ matrix.runner }} - env: - VSCODE_ARCH: ${{ matrix.vscode_arch }} - strategy: - fail-fast: false - matrix: - include: - - runner: macos-13 - vscode_arch: x64 - - runner: [self-hosted, macOS, ARM64] - vscode_arch: arm64 - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: . get_pr.sh - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - - - name: Setup Python 3 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - if: env.VSCODE_ARCH == 'x64' - - - name: Clone VSCode repo - run: . get_repo.sh - - - name: Check PR or cron - env: - GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} - run: . check_cron_or_pr.sh - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: . check_tags.sh - if: env.SHOULD_DEPLOY == 'yes' - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./build.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Prepare assets - env: - CERTIFICATE_OSX_APP_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_APP_PASSWORD }} - CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_NEW_ID }} - CERTIFICATE_OSX_P12_DATA: ${{ secrets.CERTIFICATE_OSX_NEW_P12_DATA }} - CERTIFICATE_OSX_P12_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_P12_PASSWORD }} - CERTIFICATE_OSX_TEAM_ID: ${{ secrets.CERTIFICATE_OSX_NEW_TEAM_ID }} - run: ./prepare_assets.sh - if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./release.sh - if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Update versions repo - env: - FORCE_UPDATE: ${{ github.event.inputs.force_version }} - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./update_version.sh - if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Upload assets - uses: actions/upload-artifact@v4 - with: - name: bin-${{ matrix.vscode_arch }} - path: assets/ - retention-days: 3 - if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' - - - name: Clean up keychain - if: always() - run: | - KEYCHAIN=$RUNNER_TEMP/build.keychain - - if [ -f "$KEYCHAIN" ]; - then - security delete-keychain $KEYCHAIN - fi diff --git a/.github/workflows/_insider-spearhead.yml b/.github/workflows/_insider-spearhead.yml deleted file mode 100644 index 726acae2..00000000 --- a/.github/workflows/_insider-spearhead.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: insider-spearhead - -on: - workflow_dispatch: - inputs: - new_release: - type: boolean - description: Force new Release - force_dispatch: - type: boolean - description: Force dispatch - dont_update: - type: boolean - description: Don't update VSCode - dont_dispatch: - type: boolean - description: Disable dispatch - schedule: - - cron: '0 7 * * *' - -jobs: - build: - runs-on: macos-14 - env: - APP_NAME: VSCodium - ASSETS_REPOSITORY: ${{ github.repository }}-insiders - BINARY_NAME: codium-insiders - GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} - ORG_NAME: ${{ github.repository_owner }} - OS_NAME: osx - VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions - VSCODE_ARCH: arm64 - VSCODE_LATEST: ${{ github.event.inputs.dont_update == 'true' && 'no' || 'yes' }} - VSCODE_QUALITY: insider - - steps: - - uses: actions/checkout@v4 - with: - ref: insider - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - - - name: Clone VSCode repo - run: . get_repo.sh - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NEW_RELEASE: ${{ github.event.inputs.new_release }} - IS_SPEARHEAD: 'yes' - run: . check_tags.sh - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./build.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v6 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - git_user_signingkey: true - git_commit_gpgsign: true - if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true' - - - name: Update upstream version - run: ./update_upstream.sh - if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true' - - - name: Prepare source - run: ./prepare_src.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Release source - env: - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./release.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Dispatch builds - uses: peter-evans/repository-dispatch@v3 - with: - event-type: 'insider' - if: github.event.inputs.dont_dispatch != 'true' && (env.SHOULD_BUILD == 'yes' || github.event.inputs.force_dispatch == 'true') diff --git a/.github/workflows/_insider-windows.yml b/.github/workflows/_insider-windows.yml deleted file mode 100644 index dac313a8..00000000 --- a/.github/workflows/_insider-windows.yml +++ /dev/null @@ -1,311 +0,0 @@ -name: insider-windows - -on: - workflow_dispatch: - inputs: - force_version: - type: boolean - description: Force update version - generate_assets: - type: boolean - description: Generate assets - checkout_pr: - type: string - description: Checkout PR - repository_dispatch: - types: [insider] - push: - branches: [ insider ] - paths-ignore: - - '**/*.md' - - 'upstream/*.json' - pull_request: - branches: [ insider ] - paths-ignore: - - '**/*.md' - -env: - APP_NAME: VSCodium - ASSETS_REPOSITORY: ${{ github.repository }}-insiders - BINARY_NAME: codium-insiders - GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'insider' }} - GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} - ORG_NAME: ${{ github.repository_owner }} - OS_NAME: windows - VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions - VSCODE_QUALITY: insider - -jobs: - check: - runs-on: ubuntu-latest - outputs: - MS_COMMIT: ${{ env.MS_COMMIT }} - MS_TAG: ${{ env.MS_TAG }} - RELEASE_VERSION: ${{ env.RELEASE_VERSION }} - SHOULD_BUILD: ${{ env.SHOULD_BUILD }} - SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - - - name: Clone VSCode repo - run: ./get_repo.sh - - - name: Check PR or cron - env: - GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} - run: ./check_cron_or_pr.sh - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CHECK_ALL: 'yes' - run: ./check_tags.sh - - compile: - needs: - - check - runs-on: ubuntu-20.04 - env: - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} - VSCODE_ARCH: 'x64' - outputs: - BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - if: env.SHOULD_BUILD == 'yes' - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - - - name: Setup GCC - uses: egor-tensin/setup-gcc@v1 - with: - version: 10 - platform: x64 - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - if: env.SHOULD_BUILD == 'yes' - - - name: Install Yarn - run: npm install -g yarn - if: env.SHOULD_BUILD == 'yes' - - - name: Setup Python 3 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - if: env.SHOULD_BUILD == 'yes' - - - name: Install libkrb5-dev - run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev - if: env.SHOULD_BUILD == 'yes' - - - name: Clone VSCode repo - run: ./get_repo.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Build - env: - SHOULD_BUILD_REH: 'no' - SHOULD_BUILD_REH_WEB: 'no' - run: ./build.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Compress vscode artifact - run: | - find vscode -type f -not -path "*/node_modules/*" -not -path "vscode/.build/node/*" -not -path "vscode/.git/*" > vscode.txt - echo "vscode/.build/extensions/node_modules" >> vscode.txt - echo "vscode/.git" >> vscode.txt - tar -czf vscode.tar.gz -T vscode.txt - if: env.SHOULD_BUILD == 'yes' - - - name: Upload vscode artifact - uses: actions/upload-artifact@v4 - with: - name: vscode - path: ./vscode.tar.gz - retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }} - if: env.SHOULD_BUILD == 'yes' - - build: - needs: - - check - - compile - runs-on: windows-2019 - strategy: - fail-fast: false - matrix: - vscode_arch: - - x64 - - arm64 - defaults: - run: - shell: bash - env: - BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} - SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} - VSCODE_ARCH: ${{ matrix.vscode_arch }} - outputs: - RELEASE_VERSION: ${{ env.RELEASE_VERSION }} - SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - if: env.SHOULD_BUILD == 'yes' - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - if: env.SHOULD_BUILD == 'yes' - - - name: Install Yarn - run: npm install -g yarn - if: env.SHOULD_BUILD == 'yes' - - - name: Setup Python 3 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - if: env.SHOULD_BUILD == 'yes' - - - name: Check existing VSCodium tags/releases - env: - DISABLE_MSI: ${{ vars.DISABLE_INSIDER_MSI }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./check_tags.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Download vscode artifact - uses: actions/download-artifact@v4 - with: - name: vscode - if: env.SHOULD_BUILD == 'yes' - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - npm_config_arch: ${{ matrix.vscode_arch }} - npm_config_target_arch: ${{ matrix.vscode_arch }} - run: ./build/windows/package.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Prepare assets - run: ./prepare_assets.sh - if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Upload unsigned artifacts - id: upload-unsigned-artifacts - uses: actions/upload-artifact@v4 - with: - name: unsigned-${{ matrix.vscode_arch }} - path: | - assets/*.exe - assets/*.msi - retention-days: 1 - if: env.SHOULD_BUILD == 'yes' && vars.DISABLE_INSIDER_WINDOWS_SIGNING != 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Signing - uses: signpath/github-action-submit-signing-request@v1 - with: - api-token: ${{ secrets.SIGNPATH_API_TOKEN }} - organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }} - project-slug: ${{ secrets.SIGNPATH_PROJECT_SLUG }} - signing-policy-slug: ${{ secrets.SIGNPATH_POLICY_SLUG }} - github-artifact-id: ${{ steps.upload-unsigned-artifacts.outputs.artifact-id }} - artifact-configuration-slug: ${{ matrix.vscode_arch }} - wait-for-completion: true - # 3h to manually approve the request - wait-for-completion-timeout-in-seconds: 10800 - output-artifact-directory: assets/ - if: env.SHOULD_BUILD == 'yes' && vars.DISABLE_INSIDER_WINDOWS_SIGNING != 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Prepare checksums - run: ./prepare_checksums.sh - if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./release.sh - if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Update versions repo - env: - FORCE_UPDATE: ${{ github.event.inputs.force_version }} - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./update_version.sh - if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Upload assets - uses: actions/upload-artifact@v4 - with: - name: bin-${{ matrix.vscode_arch }} - path: assets/ - retention-days: 3 - if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' - - winget: - needs: build - runs-on: windows-latest - defaults: - run: - shell: bash - env: - APP_IDENTIFIER: VSCodium.VSCodium.Insiders - ASSETS_REPOSITORY: vscodium-insiders - if: needs.build.outputs.SHOULD_DEPLOY == 'yes' - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Check version - run: ./stores/winget/check_version.sh - env: - RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }} - - - name: Release to WinGet - uses: vedantmgoyal9/winget-releaser@main - with: - identifier: ${{ env.APP_IDENTIFIER }} - version: ${{ env.RELEASE_VERSION }} - release-repository: ${{ env.ASSETS_REPOSITORY }} - release-tag: ${{ env.RELEASE_VERSION }}-insider - installers-regex: '\.exe$' # only .exe files - token: ${{ secrets.STRONGER_GITHUB_TOKEN }} - if: env.SHOULD_DEPLOY == 'yes' diff --git a/.github/workflows/_lock.yml b/.github/workflows/_lock.yml deleted file mode 100644 index 7ea85c41..00000000 --- a/.github/workflows/_lock.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Lock Issues - -on: - schedule: - - cron: '0 2 * * *' - -jobs: - lock: - runs-on: ubuntu-latest - steps: - - uses: dessant/lock-threads@v5 - with: - github-token: ${{ github.token }} - issue-inactive-days: '90' - pr-inactive-days: '90' - log-output: true diff --git a/.github/workflows/_stale.yml b/.github/workflows/_stale.yml deleted file mode 100644 index 28d2f414..00000000 --- a/.github/workflows/_stale.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Stale Issues - -on: - schedule: - - cron: '0 1 * * *' - -permissions: - issues: write - -jobs: - stale: - runs-on: ubuntu-latest - steps: - - uses: actions/stale@v9 - with: - days-before-stale: 180 - days-before-close: 30 - stale-issue-label: stale - operations-per-run: 1024 - stale-issue-message: > - This issue has been automatically marked as stale. **If this issue is still affecting you, please leave any comment**, and we'll keep it open. If you have any new additional information, please include it with your comment! - close-issue-message: > - This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue, please open a new issue. - exempt-issue-labels: discussion,never-stale - only-pr-labels: needs-information diff --git a/.github/workflows/stable-linux.yml b/.github/workflows/stable-linux.yml deleted file mode 100644 index c191f34a..00000000 --- a/.github/workflows/stable-linux.yml +++ /dev/null @@ -1,574 +0,0 @@ -name: stable-linux - -on: - workflow_dispatch: - inputs: - force_version: - type: boolean - description: Force update version - generate_assets: - type: boolean - description: Generate assets - checkout_pr: - type: string - description: Checkout PR - repository_dispatch: - types: [stable] - push: - branches: [ master, github-workflow ] - paths-ignore: - - '**/*.md' - - 'upstream/*.json' - pull_request: - branches: [ master ] - paths-ignore: - - '**/*.md' - -env: - ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true - APP_NAME: VSCodium - ASSETS_REPOSITORY: ${{ github.repository }} - BINARY_NAME: codium - DISABLE_UPDATE: 'yes' - GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} - ORG_NAME: ${{ github.repository_owner }} - OS_NAME: linux - VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions - VSCODE_QUALITY: stable - -jobs: - check: - runs-on: ubuntu-latest - outputs: - MS_COMMIT: ${{ env.MS_COMMIT }} - MS_TAG: ${{ env.MS_TAG }} - RELEASE_VERSION: ${{ env.RELEASE_VERSION }} - SHOULD_BUILD: ${{ env.SHOULD_BUILD }} - SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - - - name: Clone VSCode repo - run: ./get_repo.sh - - - name: Check PR or cron - env: - GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} - run: ./check_cron_or_pr.sh - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CHECK_ALL: 'yes' - run: ./check_tags.sh - - compile: - needs: - - check - runs-on: ubuntu-20.04 - env: - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} - VSCODE_ARCH: 'x64' - outputs: - BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - if: env.SHOULD_BUILD == 'yes' - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Setup GCC - uses: egor-tensin/setup-gcc@v1 - with: - version: 10 - platform: x64 - if: env.SHOULD_BUILD == 'yes' - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - if: env.SHOULD_BUILD == 'yes' - - - name: Install Yarn - run: npm install -g yarn - if: env.SHOULD_BUILD == 'yes' - - - name: Setup Python 3 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - if: env.SHOULD_BUILD == 'yes' - - - name: Install libkrb5-dev - run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev - if: env.SHOULD_BUILD == 'yes' - - - name: Clone VSCode repo - run: ./get_repo.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Build - env: - SHOULD_BUILD_REH: 'no' - SHOULD_BUILD_REH_WEB: 'no' - run: ./build.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Compress vscode artifact - run: | - find vscode -type f -not -path "*/node_modules/*" -not -path "vscode/.build/node/*" -not -path "vscode/.git/*" > vscode.txt - echo "vscode/.build/extensions/node_modules" >> vscode.txt - echo "vscode/.git" >> vscode.txt - tar -czf vscode.tar.gz -T vscode.txt - if: env.SHOULD_BUILD == 'yes' - - - name: Upload vscode artifact - uses: actions/upload-artifact@v4 - with: - name: vscode - path: ./vscode.tar.gz - retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }} - if: env.SHOULD_BUILD == 'yes' - - build: - needs: - - check - - compile - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - slug: X64 - vscode_arch: x64 - npm_arch: x64 - image: vscodium/vscodium-linux-build-agent:focal-x64 - - slug: ARM64 - vscode_arch: arm64 - npm_arch: arm64 - image: vscodium/vscodium-linux-build-agent:focal-arm64 - - slug: ARM32 - vscode_arch: armhf - npm_arch: arm - image: vscodium/vscodium-linux-build-agent:focal-armhf - - slug: RISCV64 - vscode_arch: riscv64 - npm_arch: riscv64 - image: vscodium/vscodium-linux-build-agent:focal-riscv64 - - slug: LOONG64 - vscode_arch: loong64 - npm_arch: loong64 - image: vscodium/vscodium-linux-build-agent:beige-loong64 - - slug: PPC64 - vscode_arch: ppc64le - npm_arch: ppc64 - image: vscodium/vscodium-linux-build-agent:focal-ppc64le - container: - image: ${{ matrix.image }} - env: - BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} - DISABLED: ${{ vars[format('DISABLE_STABLE_LINUX_APP_{0}', matrix.slug)] }} - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} - SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} - VSCODE_ARCH: ${{ matrix.vscode_arch }} - outputs: - RELEASE_VERSION: ${{ env.RELEASE_VERSION }} - SHOULD_BUILD: ${{ env.SHOULD_BUILD }} - SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - if: env.DISABLED != 'yes' - - - name: Install GH - run: ./install_gh.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Check existing VSCodium tags/releases - env: - CHECK_REH: 'no' - DISABLE_APPIMAGE: ${{ vars.DISABLE_STABLE_APPIMAGE }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./check_tags.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' - - - name: Install libkrb5-dev - run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' - - - name: Download vscode artifact - uses: actions/download-artifact@v4 - with: - name: vscode - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - npm_config_arch: ${{ matrix.npm_arch }} - run: ./build/linux/package_bin.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' - - - name: Prepare assets - env: - SHOULD_BUILD_REH: 'no' - SHOULD_BUILD_REH_WEB: 'no' - run: ./prepare_assets.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./release.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Update versions repo - env: - FORCE_UPDATE: ${{ github.event.inputs.force_version }} - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./update_version.sh - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Upload assets - uses: actions/upload-artifact@v4 - with: - name: bin-${{ matrix.vscode_arch }} - path: assets/ - retention-days: 3 - if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' - - reh_linux: - needs: - - check - - compile - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - include: - - slug: X64 - vscode_arch: x64 - npm_arch: x64 - - slug: ARM64 - vscode_arch: arm64 - npm_arch: arm64 - - slug: ARM32 - vscode_arch: armhf - npm_arch: arm - - slug: PPC64 - vscode_arch: ppc64le - npm_arch: ppc64 - - slug: RISCV64 - vscode_arch: riscv64 - npm_arch: riscv64 - - slug: LOONG64 - vscode_arch: loong64 - npm_arch: loong64 - - slug: S390X - vscode_arch: s390x - npm_arch: s390x - env: - BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} - DISABLED: ${{ vars[format('DISABLE_STABLE_LINUX_REH_{0}', matrix.slug)] }} - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }} - SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} - VSCODE_ARCH: ${{ matrix.vscode_arch }} - if: needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true' - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - if: env.DISABLED != 'yes' - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - if: env.DISABLED != 'yes' - - - name: Setup GCC - uses: egor-tensin/setup-gcc@v1 - with: - version: 10 - platform: x64 - if: env.DISABLED != 'yes' - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - if: env.DISABLED != 'yes' - - - name: Setup Python 3 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - if: env.DISABLED != 'yes' - - - name: Install libkrb5-dev - run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev - if: env.DISABLED != 'yes' - - - name: Install GH - run: ./install_gh.sh - if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CHECK_ONLY_REH: 'yes' - run: ./check_tags.sh - if: env.DISABLED != 'yes' - - - name: Download vscode artifact - uses: actions/download-artifact@v4 - with: - name: vscode - if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - npm_config_arch: ${{ matrix.npm_arch }} - run: ./build/linux/package_reh.sh - if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./release.sh - if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no') - - - name: Upload assets - uses: actions/upload-artifact@v4 - with: - name: reh-linux-${{ matrix.vscode_arch }} - path: assets/ - retention-days: 3 - if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' - - reh_alpine: - needs: - - check - - compile - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - matrix: - include: - - slug: X64 - vscode_arch: x64 - npm_arch: x64 - - slug: ARM64 - vscode_arch: arm64 - npm_arch: arm64 - env: - BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} - DISABLED: ${{ vars[format('DISABLE_STABLE_ALPINE_REH_{0}', matrix.slug)] }} - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - OS_NAME: alpine - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }} - SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} - VSCODE_ARCH: ${{ matrix.vscode_arch }} - if: needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true' - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - - - name: Setup GCC - uses: egor-tensin/setup-gcc@v1 - with: - version: 10 - platform: x64 - - - name: Install GH - run: ./install_gh.sh - if: env.SHOULD_DEPLOY == 'yes' - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CHECK_ONLY_REH: 'yes' - run: ./check_tags.sh - - - name: Install libkrb5-dev - run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev - if: env.SHOULD_BUILD == 'yes' - - - name: Download vscode artifact - uses: actions/download-artifact@v4 - with: - name: vscode - if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - npm_config_arch: ${{ matrix.npm_arch }} - run: ./build/alpine/package_reh.sh - if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true') - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./release.sh - if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no') - - - name: Upload assets - uses: actions/upload-artifact@v4 - with: - name: reh-alpine-${{ matrix.vscode_arch }} - path: assets/ - retention-days: 3 - if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' - - aur: - needs: - - check - - build - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - package_name: vscodium - package_type: stable - # - package_name: vscodium-git - # package_type: rolling - if: needs.check.outputs.SHOULD_DEPLOY == 'yes' - - 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 }} - - snap: - needs: - - check - - build - runs-on: ubuntu-latest - env: - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SNAP_NAME: codium - strategy: - fail-fast: false - matrix: - platform: - - amd64 - - arm64 - if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && needs.check.outputs.SHOULD_BUILD_SNAP != 'no' && vars.DISABLE_STABLE_SNAP != 'yes' - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - - - name: Check version - env: - ARCHITECTURE: ${{ matrix.platform }} - GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} - SNAPCRAFT_STORE_CHANNEL: ${{ vars.SNAP_STORE_CHANNEL }} - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }} - run: ./stores/snapcraft/check_version.sh - - - uses: docker/setup-qemu-action@v3 - if: env.SHOULD_BUILD == 'yes' - - - uses: diddlesnaps/snapcraft-multiarch-action@v1 - with: - path: stores/snapcraft/stable - architecture: ${{ matrix.platform }} - id: build - if: env.SHOULD_BUILD == 'yes' - - - uses: diddlesnaps/snapcraft-review-action@v1 - with: - snap: ${{ steps.build.outputs.snap }} - isClassic: 'true' - if: env.SHOULD_DEPLOY_TO_RELEASE == 'yes' || env.SHOULD_DEPLOY_TO_STORE == 'yes' - - - uses: svenstaro/upload-release-action@v2 - with: - repo_name: ${{ env.ASSETS_REPOSITORY }} - repo_token: ${{ secrets.STRONGER_GITHUB_TOKEN }} - file: ${{ steps.build.outputs.snap }} - tag: ${{ env.RELEASE_VERSION }} - if: env.SHOULD_DEPLOY_TO_RELEASE == 'yes' - - - uses: snapcore/action-publish@master - env: - SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }} - with: - snap: ${{ steps.build.outputs.snap }} - release: ${{ vars.SNAP_STORE_CHANNEL }} - if: env.SHOULD_DEPLOY_TO_STORE == 'yes' - - deb-rpm-repo-hook: - needs: - - check - - build - runs-on: ubuntu-latest - if: needs.check.outputs.SHOULD_DEPLOY == 'yes' - - steps: - - name: Trigger repository rebuild - env: - GL_PAGES_TOKEN: ${{ secrets.GL_PAGES_TOKEN }} - run: curl -X POST --fail -F token="${GL_PAGES_TOKEN}" -F ref=master https://gitlab.com/api/v4/projects/8762263/trigger/pipeline diff --git a/.github/workflows/stable-macos.yml b/.github/workflows/stable-macos.yml deleted file mode 100644 index 1b3563a3..00000000 --- a/.github/workflows/stable-macos.yml +++ /dev/null @@ -1,132 +0,0 @@ -name: stable-macos - -on: - workflow_dispatch: - inputs: - force_version: - type: boolean - description: Force update version - generate_assets: - type: boolean - description: Generate assets - checkout_pr: - type: string - description: Checkout PR - repository_dispatch: - types: [stable] - push: - branches: [ master, github-workflow ] - paths-ignore: - - '**/*.md' - - 'upstream/*.json' - pull_request: - branches: [ master ] - paths-ignore: - - '**/*.md' - -env: - APP_NAME: VSCodium - ASSETS_REPOSITORY: ${{ github.repository }} - BINARY_NAME: codium - GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} - ORG_NAME: ${{ github.repository_owner }} - OS_NAME: osx - VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions - VSCODE_QUALITY: stable - -jobs: - build: - runs-on: ${{ matrix.runner }} - env: - VSCODE_ARCH: ${{ matrix.vscode_arch }} - strategy: - fail-fast: false - matrix: - include: - - runner: macos-13 - vscode_arch: x64 - - runner: [self-hosted, macOS, ARM64] - vscode_arch: arm64 - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: . get_pr.sh - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - - - name: Setup Python 3 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - if: env.VSCODE_ARCH == 'x64' - - - name: Clone VSCode repo - run: . get_repo.sh - - - name: Check PR or cron - env: - GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} - run: . check_cron_or_pr.sh - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: . check_tags.sh - if: env.SHOULD_DEPLOY == 'yes' - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./build.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Prepare assets - env: - CERTIFICATE_OSX_APP_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_APP_PASSWORD }} - CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_NEW_ID }} - CERTIFICATE_OSX_P12_DATA: ${{ secrets.CERTIFICATE_OSX_NEW_P12_DATA }} - CERTIFICATE_OSX_P12_PASSWORD: ${{ secrets.CERTIFICATE_OSX_NEW_P12_PASSWORD }} - CERTIFICATE_OSX_TEAM_ID: ${{ secrets.CERTIFICATE_OSX_NEW_TEAM_ID }} - run: ./prepare_assets.sh - if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./release.sh - if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Update versions repo - env: - FORCE_UPDATE: ${{ github.event.inputs.force_version }} - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./update_version.sh - if: env.SHOULD_DEPLOY == 'yes' - - - name: Upload assets - uses: actions/upload-artifact@v4 - with: - name: bin-${{ matrix.vscode_arch }} - path: assets/ - retention-days: 3 - if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' - - - name: Clean up keychain - if: always() - run: | - KEYCHAIN=$RUNNER_TEMP/build.keychain - - if [ -f "$KEYCHAIN" ]; - then - security delete-keychain $KEYCHAIN - fi diff --git a/.github/workflows/stable-spearhead.yml b/.github/workflows/stable-spearhead.yml deleted file mode 100644 index b7d745ee..00000000 --- a/.github/workflows/stable-spearhead.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: stable-spearhead - -on: - workflow_dispatch: - inputs: - new_release: - type: boolean - description: Force new Release - force_dispatch: - type: boolean - description: Force dispatch - dont_update: - type: boolean - description: Don't update VSCode - schedule: - - cron: '0 18 * * *' - -jobs: - build: - runs-on: macos-14 - env: - APP_NAME: VSCodium - ASSETS_REPOSITORY: ${{ github.repository }} - BINARY_NAME: codium - GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} - ORG_NAME: ${{ github.repository_owner }} - OS_NAME: osx - VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions - VSCODE_ARCH: arm64 - VSCODE_LATEST: ${{ github.event.inputs.dont_update == 'true' && 'no' || 'yes' }} - VSCODE_QUALITY: stable - - steps: - - uses: actions/checkout@v4 - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - - - name: Clone VSCode repo - run: . get_repo.sh - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - NEW_RELEASE: ${{ github.event.inputs.new_release }} - IS_SPEARHEAD: 'yes' - run: . check_tags.sh - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./build.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Import GPG key - uses: crazy-max/ghaction-import-gpg@v6 - with: - gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} - passphrase: ${{ secrets.GPG_PASSPHRASE }} - git_user_signingkey: true - git_commit_gpgsign: true - if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true' - - - name: Update upstream version - run: ./update_upstream.sh - if: env.SHOULD_BUILD == 'yes' && github.event.inputs.dont_update != 'true' - - - name: Prepare source - run: ./prepare_src.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Release source - env: - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./release.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Dispatch builds - uses: peter-evans/repository-dispatch@v3 - with: - event-type: 'stable' - if: env.SHOULD_BUILD == 'yes' || github.event.inputs.force_dispatch == 'true' diff --git a/.github/workflows/stable-windows.yml b/.github/workflows/stable-windows.yml deleted file mode 100644 index 28931ec9..00000000 --- a/.github/workflows/stable-windows.yml +++ /dev/null @@ -1,307 +0,0 @@ -name: stable-windows - -on: - workflow_dispatch: - inputs: - force_version: - type: boolean - description: Force update version - generate_assets: - type: boolean - description: Generate assets - checkout_pr: - type: string - description: Checkout PR - repository_dispatch: - types: [stable] - push: - branches: [ master ] - paths-ignore: - - '**/*.md' - - 'upstream/*.json' - pull_request: - branches: [ master ] - paths-ignore: - - '**/*.md' - -env: - APP_NAME: VSCodium - ASSETS_REPOSITORY: ${{ github.repository }} - BINARY_NAME: codium - GH_REPO_PATH: ${{ github.repository_owner }}/${{ github.repository }} - ORG_NAME: ${{ github.repository_owner }} - OS_NAME: windows - VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions - VSCODE_QUALITY: stable - -jobs: - check: - runs-on: ubuntu-latest - outputs: - MS_COMMIT: ${{ env.MS_COMMIT }} - MS_TAG: ${{ env.MS_TAG }} - RELEASE_VERSION: ${{ env.RELEASE_VERSION }} - SHOULD_BUILD: ${{ env.SHOULD_BUILD }} - SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - - - name: Clone VSCode repo - run: ./get_repo.sh - - - name: Check PR or cron - env: - GENERATE_ASSETS: ${{ github.event.inputs.generate_assets }} - run: ./check_cron_or_pr.sh - - - name: Check existing VSCodium tags/releases - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CHECK_ALL: 'yes' - run: ./check_tags.sh - - compile: - needs: - - check - runs-on: ubuntu-20.04 - env: - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} - VSCODE_ARCH: 'x64' - outputs: - BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - if: env.SHOULD_BUILD == 'yes' - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - - - name: Setup GCC - uses: egor-tensin/setup-gcc@v1 - with: - version: 10 - platform: x64 - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - if: env.SHOULD_BUILD == 'yes' - - - name: Install Yarn - run: npm install -g yarn - if: env.SHOULD_BUILD == 'yes' - - - name: Setup Python 3 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - if: env.SHOULD_BUILD == 'yes' - - - name: Install libkrb5-dev - run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev - if: env.SHOULD_BUILD == 'yes' - - - name: Clone VSCode repo - run: ./get_repo.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Build - env: - SHOULD_BUILD_REH: 'no' - SHOULD_BUILD_REH_WEB: 'no' - run: ./build.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Compress vscode artifact - run: | - find vscode -type f -not -path "*/node_modules/*" -not -path "vscode/.build/node/*" -not -path "vscode/.git/*" > vscode.txt - echo "vscode/.build/extensions/node_modules" >> vscode.txt - echo "vscode/.git" >> vscode.txt - tar -czf vscode.tar.gz -T vscode.txt - if: env.SHOULD_BUILD == 'yes' - - - name: Upload vscode artifact - uses: actions/upload-artifact@v4 - with: - name: vscode - path: ./vscode.tar.gz - retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }} - if: env.SHOULD_BUILD == 'yes' - - build: - needs: - - check - - compile - runs-on: windows-2019 - strategy: - fail-fast: false - matrix: - vscode_arch: - - x64 - - arm64 - defaults: - run: - shell: bash - env: - BUILD_SOURCEVERSION: ${{ needs.compile.outputs.BUILD_SOURCEVERSION }} - MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }} - MS_TAG: ${{ needs.check.outputs.MS_TAG }} - RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }} - SHOULD_BUILD: ${{ (needs.check.outputs.SHOULD_BUILD == 'yes' || github.event.inputs.generate_assets == 'true') && 'yes' || 'no' }} - SHOULD_DEPLOY: ${{ needs.check.outputs.SHOULD_DEPLOY }} - VSCODE_ARCH: ${{ matrix.vscode_arch }} - outputs: - RELEASE_VERSION: ${{ env.RELEASE_VERSION }} - SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }} - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - if: env.SHOULD_BUILD == 'yes' - - - name: Switch to relevant branch - env: - PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }} - run: ./get_pr.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Setup Node.js environment - uses: actions/setup-node@v4 - with: - node-version: '20.18.2' - if: env.SHOULD_BUILD == 'yes' - - - name: Install Yarn - run: npm install -g yarn - if: env.SHOULD_BUILD == 'yes' - - - name: Setup Python 3 - uses: actions/setup-python@v5 - with: - python-version: '3.11' - if: env.SHOULD_BUILD == 'yes' - - - name: Check existing VSCodium tags/releases - env: - DISABLE_MSI: ${{ vars.DISABLE_STABLE_MSI }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./check_tags.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Download vscode artifact - uses: actions/download-artifact@v4 - with: - name: vscode - if: env.SHOULD_BUILD == 'yes' - - - name: Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - npm_config_arch: ${{ matrix.vscode_arch }} - npm_config_target_arch: ${{ matrix.vscode_arch }} - run: ./build/windows/package.sh - if: env.SHOULD_BUILD == 'yes' - - - name: Prepare assets - run: ./prepare_assets.sh - if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Upload unsigned artifacts - id: upload-unsigned-artifacts - uses: actions/upload-artifact@v4 - with: - name: unsigned-${{ matrix.vscode_arch }} - path: | - assets/*.exe - assets/*.msi - retention-days: 1 - if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Signing - uses: signpath/github-action-submit-signing-request@v1 - with: - api-token: ${{ secrets.SIGNPATH_API_TOKEN }} - organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }} - project-slug: ${{ secrets.SIGNPATH_PROJECT_SLUG }} - signing-policy-slug: ${{ secrets.SIGNPATH_POLICY_SLUG }} - github-artifact-id: ${{ steps.upload-unsigned-artifacts.outputs.artifact-id }} - artifact-configuration-slug: ${{ matrix.vscode_arch }} - wait-for-completion: true - # 3h to manually approve the request - wait-for-completion-timeout-in-seconds: 10800 - output-artifact-directory: assets/ - if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Prepare checksums - run: ./prepare_checksums.sh - if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true') - - - name: Release - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: ./release.sh - if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Update versions repo - env: - FORCE_UPDATE: ${{ github.event.inputs.force_version }} - GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }} - GITHUB_USERNAME: ${{ github.repository_owner }} - run: ./update_version.sh - if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes' - - - name: Upload assets - uses: actions/upload-artifact@v4 - with: - name: bin-${{ matrix.vscode_arch }} - path: assets/ - retention-days: 3 - if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'no' && github.event.inputs.generate_assets == 'true' - - winget: - needs: build - runs-on: windows-latest - defaults: - run: - shell: bash - env: - APP_IDENTIFIER: VSCodium.VSCodium - if: needs.build.outputs.SHOULD_DEPLOY == 'yes' - - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ env.GITHUB_BRANCH }} - - - name: Check version - run: ./stores/winget/check_version.sh - env: - RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }} - - - name: Release to WinGet - uses: vedantmgoyal9/winget-releaser@main - with: - identifier: ${{ env.APP_IDENTIFIER }} - version: ${{ env.RELEASE_VERSION }} - release-tag: ${{ env.RELEASE_VERSION }} - installers-regex: '\.exe$' # only .exe files - token: ${{ secrets.STRONGER_GITHUB_TOKEN }} - if: env.SHOULD_DEPLOY == 'yes' diff --git a/.github/workflows/void-build.yml b/.github/workflows/void-build.yml deleted file mode 100644 index 379ba257..00000000 --- a/.github/workflows/void-build.yml +++ /dev/null @@ -1,405 +0,0 @@ -name: Build Void - -on: - push: - branches: [ main, release/*, github-workflow ] - pull_request: - branches: [ main ] - workflow_dispatch: - -jobs: - build-linux: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-linux-x64-min - - - name: Package - run: | - mkdir -p .build/linux/client - ARCHIVE_PATH=".build/linux/client/void-linux-x64.tar.gz" - tar -czf $ARCHIVE_PATH -C .. VSCode-linux-x64 - - - name: Generate checksum - run: | - cd .build/linux/client - sha256sum void-linux-x64.tar.gz > void-linux-x64.tar.gz.sha256 - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-linux-x64 - path: | - .build/linux/client/void-linux-x64.tar.gz - .build/linux/client/void-linux-x64.tar.gz.sha256 - - build-linux-arm64: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libx11-dev libxkbfile-dev libsecret-1-dev libkrb5-dev - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-linux-arm64-min - - - name: Package - run: | - mkdir -p .build/linux/client - ARCHIVE_PATH=".build/linux/client/void-linux-arm64.tar.gz" - tar -czf $ARCHIVE_PATH -C .. VSCode-linux-arm64 - - - name: Generate checksum - run: | - cd .build/linux/client - sha256sum void-linux-arm64.tar.gz > void-linux-arm64.tar.gz.sha256 - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-linux-arm64 - path: | - .build/linux/client/void-linux-arm64.tar.gz - .build/linux/client/void-linux-arm64.tar.gz.sha256 - - build-windows: - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-win32-x64-min - - - name: Package - run: | - mkdir -p .build/win32-x64 - Compress-Archive -Path ..\VSCode-win32-x64\* -DestinationPath .build\win32-x64\void-win32-x64.zip - shell: pwsh - - - name: Generate checksum - run: | - cd .build/win32-x64 - $hash = Get-FileHash -Algorithm SHA256 void-win32-x64.zip - $hash.Hash | Out-File -Encoding ascii void-win32-x64.zip.sha256 - shell: pwsh - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-win32-x64 - path: | - .build/win32-x64/void-win32-x64.zip - .build/win32-x64/void-win32-x64.zip.sha256 - - build-windows-arm64: - runs-on: windows-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm install - npm install -g node-gyp - npm install -g gulp-cli - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-win32-arm64-min - - - name: Package - run: | - mkdir -p .build/win32-arm64 - Compress-Archive -Path ..\VSCode-win32-arm64\* -DestinationPath .build\win32-arm64\void-win32-arm64.zip - shell: pwsh - - - name: Generate checksum - run: | - cd .build/win32-arm64 - $hash = Get-FileHash -Algorithm SHA256 void-win32-arm64.zip - $hash.Hash | Out-File -Encoding ascii void-win32-arm64.zip.sha256 - shell: pwsh - - - name: Upload artifacts - uses: actions/upload-artifact@v4 - with: - name: void-win32-arm64 - path: | - .build/win32-arm64/void-win32-arm64.zip - .build/win32-arm64/void-win32-arm64.zip.sha256 - - build-macos: - runs-on: macos-latest-large - strategy: - matrix: - arch: [arm64, x64] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version-file: '.nvmrc' - cache: 'npm' - - - name: Install dependencies - run: | - # Set npm config to use GitHub token for authentication to avoid rate limits - npm config set //github.com/:_authToken=${{ github.token }} - npm config set //api.github.com/:_authToken=${{ github.token }} - npm config set //npm.pkg.github.com/:_authToken=${{ github.token }} - # Configure npm to use the GitHub token for all requests to github.com domains - npm config set @microsoft:registry https://npm.pkg.github.com - npm config set @vscode:registry https://npm.pkg.github.com - # Increase network timeout to handle slow connections - npm config set fetch-timeout 300000 - npm config set fetch-retry-mintimeout 20000 - npm config set fetch-retry-maxtimeout 120000 - npm install - npm install -g node-gyp - npm install -g gulp-cli - npm install -g create-dmg - - - name: Build - run: | - npm run buildreact - npm run gulp vscode-darwin-${{ matrix.arch }}-min - - - name: Create temporary working directory - run: | - WORKING_DIR="${{ runner.temp }}/VoidSign-${{ matrix.arch }}" - KEYCHAIN_DIR="${WORKING_DIR}/1_Keychain" - SIGN_DIR="${WORKING_DIR}/2_Signed" - mkdir -p "${WORKING_DIR}" "${KEYCHAIN_DIR}" "${SIGN_DIR}" - cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" - echo "WORKING_DIR=${WORKING_DIR}" >> $GITHUB_ENV - echo "KEYCHAIN_DIR=${KEYCHAIN_DIR}" >> $GITHUB_ENV - echo "SIGN_DIR=${SIGN_DIR}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP_DIR=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP=${SIGN_DIR}/VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - - - name: Import certificate - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} - env: - P12_BASE64: ${{ secrets.MACOS_CERTIFICATE }} - P12_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PWD }} - KEYCHAIN_PASSWORD: "temporary-password" - run: | - KEYCHAIN="${KEYCHAIN_DIR}/buildagent.keychain" - echo "KEYCHAIN=${KEYCHAIN}" >> $GITHUB_ENV - - # Create a new keychain - security create-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" - security set-keychain-settings -lut 21600 "${KEYCHAIN}" - security unlock-keychain -p "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" - - # Import certificate - echo "${P12_BASE64}" | base64 --decode > "${KEYCHAIN_DIR}/certificate.p12" - security import "${KEYCHAIN_DIR}/certificate.p12" -k "${KEYCHAIN}" -P "${P12_PASSWORD}" -T /usr/bin/codesign - security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "${KEYCHAIN_PASSWORD}" "${KEYCHAIN}" > /dev/null - - # Add to keychain list - security list-keychains -d user -s "${KEYCHAIN}" $(security list-keychains -d user | sed s/\"//g) - - - name: Sign Application - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} - env: - CODESIGN_IDENTITY: ${{ secrets.MACOS_SIGNING_IDENTITY }} - VSCODE_ARCH: ${{ matrix.arch }} - run: | - export AGENT_TEMPDIRECTORY="${KEYCHAIN_DIR}" - cd $(pwd)/build/darwin - node sign.js "${SIGN_DIR}" - codesign --verify --verbose=4 "${SIGNED_DOTAPP}" - - - name: Create Unsigned App (for PR builds) - if: ${{ github.event_name == 'pull_request' || github.repository != 'voideditor/void' }} - run: | - cp -Rp "$(pwd)/../VSCode-darwin-${{ matrix.arch }}" "${SIGN_DIR}" - echo "SIGNED_DOTAPP_DIR=$(pwd)/../VSCode-darwin-${{ matrix.arch }}" >> $GITHUB_ENV - echo "SIGNED_DOTAPP=$(pwd)/../VSCode-darwin-${{ matrix.arch }}/Void.app" >> $GITHUB_ENV - - - name: Create DMG - run: | - cd "${SIGNED_DOTAPP_DIR}" - npx create-dmg --volname "Void Installer" "${SIGNED_DOTAPP}" . || true - GENERATED_DMG=$(ls *.dmg) - mv "${GENERATED_DMG}" "Void-Installer-darwin-${{ matrix.arch }}.dmg" - - if [[ "${{ github.event_name }}" != "pull_request" && "${{ github.repository }}" == "voideditor/void" ]]; then - codesign --verify --verbose=4 "Void-Installer-darwin-${{ matrix.arch }}.dmg" - fi - - echo "SIGNED_DMG=${SIGNED_DOTAPP_DIR}/Void-Installer-darwin-${{ matrix.arch }}.dmg" >> $GITHUB_ENV - - - name: Notarize - if: ${{ github.event_name != 'pull_request' && github.repository == 'voideditor/void' }} - env: - APPLE_ID: ${{ secrets.APPLE_ID }} - TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} - APP_PASSWORD: ${{ secrets.APPLE_APP_PWD }} - KEYCHAIN_PASSWORD: "temporary-password" - run: | - # Store credentials for notarization - xcrun notarytool store-credentials "Void" \ - --apple-id "${APPLE_ID}" \ - --team-id "${TEAM_ID}" \ - --password "${APP_PASSWORD}" \ - --keychain "${KEYCHAIN}" - - # Submit for notarization with a timeout - xcrun notarytool submit "${SIGNED_DMG}" \ - --keychain-profile "Void" \ - --keychain "${KEYCHAIN}" \ - --wait --timeout 2h - - # Staple the notarization ticket - xcrun stapler staple "${SIGNED_DMG}" - - - name: Create Raw App Archive - run: | - cd "${SIGNED_DOTAPP_DIR}" - VOIDAPP=$(basename "${SIGNED_DOTAPP}") - ditto -c -k --sequesterRsrc --keepParent "${VOIDAPP}" "Void-RawApp-darwin-${{ matrix.arch }}.zip" - - - name: Generate Hash File - run: | - cd "${SIGNED_DOTAPP_DIR}" - SHA1=$(shasum -a 1 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) - SHA256=$(shasum -a 256 "Void-RawApp-darwin-${{ matrix.arch }}.zip" | cut -d' ' -f1) - TIMESTAMP=$(date +%s) - - cat > "Void-UpdJSON-darwin-${{ matrix.arch }}.json" << EOF - { - "sha256hash": "${SHA256}", - "hash": "${SHA1}", - "timestamp": ${TIMESTAMP} - } - EOF - - - name: Generate checksum for DMG - run: | - cd "${SIGNED_DOTAPP_DIR}" - shasum -a 256 "Void-Installer-darwin-${{ matrix.arch }}.dmg" > "Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256" - - - name: Upload DMG - uses: actions/upload-artifact@v4 - with: - name: void-darwin-${{ matrix.arch }}-dmg - path: | - ${{ env.SIGNED_DMG }} - ${{ env.SIGNED_DOTAPP_DIR }}/Void-Installer-darwin-${{ matrix.arch }}.dmg.sha256 - - - name: Upload Raw App - uses: actions/upload-artifact@v4 - with: - name: void-darwin-${{ matrix.arch }}-rawapp - path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-RawApp-darwin-${{ matrix.arch }}.zip - - - name: Upload Hash File - uses: actions/upload-artifact@v4 - with: - name: void-darwin-${{ matrix.arch }}-hash - path: ${{ env.SIGNED_DOTAPP_DIR }}/Void-UpdJSON-darwin-${{ matrix.arch }}.json -