Compare commits

...

9 Commits

Author SHA1 Message Date
Baptiste Augrain
3db4d595d6 ci: publish workflows are always deploying 2026-04-18 14:31:22 +02:00
Baptiste Augrain
54162c187a ci: fix permissions 2026-04-18 12:39:40 +02:00
Baptiste Augrain
c04ffc4585 ci: use existing release version number 2026-04-18 12:38:01 +02:00
Baptiste Augrain
55edf6dfa9 ci: split spearheads so they ask for environment when only needed 2026-04-18 12:36:50 +02:00
Baptiste Augrain
27c3b34038 ci: fix build workflows 2026-04-18 03:29:20 +02:00
Baptiste Augrain
9ca7fc4b60 ci: fix expressions and permissions 2026-04-18 03:20:59 +02:00
Baptiste Augrain
7132e64cf0 ci: don't use env variable or upper function 2026-04-18 03:08:04 +02:00
Baptiste Augrain
ddf1059d9d ci: split build and publish workflows (#2795) 2026-04-18 02:56:46 +02:00
Baptiste Augrain
7a41cce96d fix(update): update isLatestVersion() to compare versions (#2777) 2026-04-17 02:30:41 +02:00
21 changed files with 1410 additions and 900 deletions

View File

@@ -1,12 +1,9 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: github-actions
directory: /
target-branch: insider
schedule:
interval: "weekly"
interval: weekly
cooldown:
default-days: 7

371
.github/workflows/ci-build-linux.yml vendored Normal file
View File

@@ -0,0 +1,371 @@
name: CI - Build - Linux
on:
workflow_dispatch:
inputs:
generate_assets:
type: boolean
description: Generate assets
checkout_pr:
type: string
description: Checkout PR
push:
branches:
- master
- insider
paths-ignore:
- "**/*.md"
pull_request:
branches:
- "**"
paths-ignore:
- "**/*.md"
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
APP_NAME: VSCodium
BINARY_NAME: ${{ (github.ref == 'refs/heads/insider' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'insider')) && 'codium-insiders' || 'codium' }}
DISABLE_UPDATE: yes
GH_REPO_PATH: ${{ github.repository }}
GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.event.head }}
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: linux
VSCODE_QUALITY: ${{ (github.ref == 'refs/heads/insider' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'insider')) && 'insider' || 'stable' }}
permissions: {}
jobs:
compile:
runs-on: ubuntu-22.04
env:
VSCODE_ARCH: x64
outputs:
BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }}
MS_COMMIT: ${{ env.MS_COMMIT }}
MS_TAG: ${{ env.MS_TAG }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
- 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@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
with:
version: 10
platform: x64
- name: Setup Node.js environment
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: .nvmrc
- name: Setup Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.11"
- name: Install libkrb5-dev
run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev
- name: Clone VSCode repo
run: ./get_repo.sh
- name: Build
env:
SHOULD_BUILD: yes
SHOULD_BUILD_REH: no
SHOULD_BUILD_REH_WEB: no
run: ./build.sh
- 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
- name: Upload vscode artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: vscode
path: ./vscode.tar.gz
retention-days: 1
build:
needs:
- 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:crimson-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_{0}_LINUX_APP_{1}', ((github.ref == 'refs/heads/insider' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'insider')) && 'INSIDER' || 'STABLE'), matrix.slug)] }}
MS_COMMIT: ${{ needs.compile.outputs.MS_COMMIT }}
MS_TAG: ${{ needs.compile.outputs.MS_TAG }}
RELEASE_VERSION: ${{ needs.compile.outputs.RELEASE_VERSION }}
VSCODE_ARCH: ${{ matrix.vscode_arch }}
outputs:
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
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: Install GH
run: ./build/linux/install_gh.sh
if: env.DISABLED != 'yes'
- name: Install dependencies
run: ./build/linux/deps.sh
if: env.DISABLED != 'yes'
- uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
if: env.DISABLED != 'yes'
- name: Download vscode artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode
if: env.DISABLED != 'yes'
- name: Build
id: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_arch }}
run: ./build/linux/package_bin.sh
if: env.DISABLED != 'yes'
- name: Prepare assets
env:
SHOULD_BUILD_APPIMAGE: ${{ vars[format('DISABLE_{0}_APPIMAGE', ((github.ref == 'refs/heads/insider' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'insider')) && 'INSIDER' || 'STABLE'))] == 'yes' && 'no' || 'yes' }}
SHOULD_BUILD_REH: 'no'
SHOULD_BUILD_REH_WEB: 'no'
VSCODE_SYSROOT_REPOSITORY: ${{ steps.build.outputs.VSCODE_SYSROOT_REPOSITORY }}
VSCODE_SYSROOT_VERSION: ${{ steps.build.outputs.VSCODE_SYSROOT_VERSION }}
VSCODE_SYSROOT_PREFIX: ${{ steps.build.outputs.VSCODE_SYSROOT_PREFIX }}
run: ./prepare_assets.sh
if: env.DISABLED != 'yes' && github.event.inputs.generate_assets == 'true'
- name: Upload assets
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: bin-${{ matrix.vscode_arch }}
path: assets/
retention-days: 3
if: env.DISABLED != 'yes' && github.event.inputs.generate_assets == 'true'
reh_linux:
needs:
- compile
runs-on: ubuntu-22.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_{0}_LINUX_REH_{1}', ((github.ref == 'refs/heads/insider' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'insider')) && 'INSIDER' || 'STABLE'), matrix.slug)] }}
MS_COMMIT: ${{ needs.compile.outputs.MS_COMMIT }}
MS_TAG: ${{ needs.compile.outputs.MS_TAG }}
RELEASE_VERSION: ${{ needs.compile.outputs.RELEASE_VERSION }}
VSCODE_ARCH: ${{ matrix.vscode_arch }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
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@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
with:
version: 10
platform: x64
if: env.DISABLED != 'yes'
- name: Setup Node.js environment
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
if: env.DISABLED != 'yes'
- name: Setup Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
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: ./build/linux/install_gh.sh
if: env.DISABLED != 'yes'
- name: Download vscode artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
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: Upload assets
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: reh-linux-${{ matrix.vscode_arch }}
path: assets/
retention-days: 3
if: env.DISABLED != 'yes' && github.event.inputs.generate_assets == 'true'
reh_alpine:
needs:
- compile
runs-on: ubuntu-22.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_{0}_ALPINE_REH_{1}', ((github.ref == 'refs/heads/insider' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'insider')) && 'INSIDER' || 'STABLE'), matrix.slug)] }}
MS_COMMIT: ${{ needs.compile.outputs.MS_COMMIT }}
MS_TAG: ${{ needs.compile.outputs.MS_TAG }}
OS_NAME: alpine
RELEASE_VERSION: ${{ needs.compile.outputs.RELEASE_VERSION }}
VSCODE_ARCH: ${{ matrix.vscode_arch }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
- 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@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
with:
version: 10
platform: x64
- name: Setup Node.js environment
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- name: Install GH
run: ./build/linux/install_gh.sh
- name: Install libkrb5-dev
run: sudo apt-get update -y && sudo apt-get install -y libkrb5-dev
- name: Download vscode artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
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: Upload assets
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: reh-alpine-${{ matrix.vscode_arch }}
path: assets/
retention-days: 3
if: env.DISABLED != 'yes' && github.event.inputs.generate_assets == 'true'

90
.github/workflows/ci-build-macos.yml vendored Normal file
View File

@@ -0,0 +1,90 @@
name: CI - Build - macOS
on:
workflow_dispatch:
inputs:
generate_assets:
type: boolean
description: Generate assets
checkout_pr:
type: string
description: Checkout PR
push:
branches:
- master
- insider
paths-ignore:
- "**/*.md"
pull_request:
branches:
- "**"
paths-ignore:
- "**/*.md"
env:
APP_NAME: VSCodium
BINARY_NAME: ${{ (github.ref == 'refs/heads/insider' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'insider')) && 'codium-insiders' || 'codium' }}
GH_REPO_PATH: ${{ github.repository }}
GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.event.head }}
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: osx
VSCODE_QUALITY: ${{ (github.ref == 'refs/heads/insider' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'insider')) && 'insider' || 'stable' }}
permissions: {}
jobs:
build:
runs-on: ${{ matrix.runner }}
env:
VSCODE_ARCH: ${{ matrix.vscode_arch }}
strategy:
fail-fast: false
matrix:
include:
- runner: macos-15-intel
vscode_arch: x64
- runner: [self-hosted, macOS, ARM64]
vscode_arch: arm64
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
- 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@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- name: Setup Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
if: env.VSCODE_ARCH == 'x64'
- name: Clone VSCode repo
run: . get_repo.sh
- name: Build
env:
SHOULD_BUILD: yes
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./build.sh
- name: Prepare assets
run: ./prepare_assets.sh
if: env.SHOULD_BUILD == 'yes' && github.event.inputs.generate_assets == 'true'
- name: Upload assets
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: bin-${{ matrix.vscode_arch }}
path: assets/
retention-days: 3
if: env.SHOULD_BUILD == 'yes' && github.event.inputs.generate_assets == 'true'

164
.github/workflows/ci-build-windows.yml vendored Normal file
View File

@@ -0,0 +1,164 @@
name: CI - Build - Windows
on:
workflow_dispatch:
inputs:
generate_assets:
type: boolean
description: Generate assets
checkout_pr:
type: string
description: Checkout PR
push:
branches:
- master
- insider
paths-ignore:
- "**/*.md"
pull_request:
branches:
- "**"
paths-ignore:
- "**/*.md"
env:
APP_NAME: VSCodium
BINARY_NAME: ${{ (github.ref == 'refs/heads/insider' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'insider')) && 'codium-insiders' || 'codium' }}
GH_REPO_PATH: ${{ github.repository }}
GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.event.head }}
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: windows
VSCODE_QUALITY: ${{ (github.ref == 'refs/heads/insider' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'insider')) && 'insider' || 'stable' }}
permissions: {}
jobs:
compile:
runs-on: windows-2022
defaults:
run:
shell: bash
env:
VSCODE_ARCH: 'x64'
outputs:
BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }}
MS_COMMIT: ${{ env.MS_COMMIT }}
MS_TAG: ${{ env.MS_TAG }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
- 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@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- name: Setup Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
- name: Clone VSCode repo
run: ./get_repo.sh
- name: Build
env:
SHOULD_BUILD: yes
SHOULD_BUILD_REH: no
SHOULD_BUILD_REH_WEB: no
run: ./build.sh
- 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
- name: Upload vscode artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: vscode
path: ./vscode.tar.gz
retention-days: 1
build:
needs:
- compile
runs-on: windows-2022
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 }}
VSCODE_ARCH: ${{ matrix.vscode_arch }}
outputs:
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
- 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@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- name: Setup Python 3
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
- name: Download vscode artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode
- name: Build
env:
DISABLE_MSI: ${{ vars[format('DISABLE_{0}_MSI', ((github.ref == 'refs/heads/insider' || (github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'insider')) && 'INSIDER' || 'STABLE'))] }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.vscode_arch }}
npm_config_target_arch: ${{ matrix.vscode_arch }}
run: ./build/windows/package.sh
- name: Prepare assets
run: ./prepare_assets.sh
if: github.event.inputs.generate_assets == 'true'
- name: Prepare checksums
run: ./prepare_checksums.sh
if: github.event.inputs.generate_assets == 'true'
- name: Upload assets
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: bin-${{ matrix.vscode_arch }}
path: assets/
retention-days: 3
if: github.event.inputs.generate_assets == 'true'

View File

@@ -1,98 +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-15
env:
APP_NAME: VSCodium
ASSETS_REPOSITORY: ${{ github.repository }}-insiders
BINARY_NAME: codium-insiders
GH_REPO_PATH: ${{ github.repository }}
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: osx
SOURCEMAPS_REPOSITORY: ${{ github.repository_owner }}/sourcemaps
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@v6
with:
ref: insider
- name: Setup Node.js environment
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- 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@v7
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: Upload sourcemaps
env:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./upload_sourcemaps.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@v4
with:
event-type: insider
if: github.event.inputs.dont_dispatch != 'true' && (env.SHOULD_BUILD == 'yes' || github.event.inputs.force_dispatch == 'true')

30
.github/workflows/lint-zizmor.yml vendored Normal file
View File

@@ -0,0 +1,30 @@
name: Lint - zizmor
on:
push:
branches:
- master
- insider
paths-ignore:
- "**/*.md"
pull_request:
branches:
- "**"
paths-ignore:
- "**/*.md"
permissions: {}
jobs:
zizmor:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Run zizmor
uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2

View File

@@ -1,17 +0,0 @@
name: Lock Closed Threads
on:
schedule:
- cron: '0 2 * * *'
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v6
with:
github-token: ${{ github.token }}
issue-inactive-days: '90'
pr-inactive-days: '90'
discussion-inactive-days: '90'
log-output: true

View File

@@ -0,0 +1,22 @@
name: Moderation - Lock Closed Threads
on:
schedule:
- cron: 0 2 * * *
permissions:
issues: write
pull-requests: write
discussions: write
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@7266a7ce5c1df01b1c6db85bf8cd86c737dadbe7 # v6.0.0
with:
github-token: ${{ github.token }}
issue-inactive-days: "90"
pr-inactive-days: "90"
discussion-inactive-days: "90"
log-output: true

View File

@@ -0,0 +1,24 @@
name: Moderation - Stale Issues & PR
on:
schedule:
- cron: 0 1 * * *
permissions:
issues: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
with:
days-before-stale: 90
days-before-close: 30
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
stale-pr-message: This PR has been automatically marked as stale.
close-pr-message: This PR has been closed due to inactivity, and will not be monitored.
only-pr-labels: needs-information

View File

@@ -1,37 +1,19 @@
name: insider-linux
name: Publish - 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
workflow_dispatch: {}
repository_dispatch:
types: [insider]
push:
branches: [ insider ]
paths-ignore:
- '**/*.md'
- 'upstream/*.json'
pull_request:
branches: [ insider ]
paths-ignore:
- '**/*.md'
types:
- publish-insider
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
APP_NAME: VSCodium
ASSETS_REPOSITORY: ${{ github.repository }}-insiders
BINARY_NAME: codium-insiders
DISABLE_UPDATE: 'yes'
DISABLE_UPDATE: yes
GH_REPO_PATH: ${{ github.repository }}
GITHUB_BRANCH: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'insider' }}
GITHUB_BRANCH: insider
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: linux
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
@@ -40,77 +22,66 @@ env:
jobs:
check:
runs-on: ubuntu-latest
permissions: {}
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@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh
persist-credentials: false
- 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'
CHECK_ALL: yes
run: ./check_tags.sh
compile:
needs:
- check
runs-on: ubuntu-22.04
permissions: {}
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'
SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }}
VSCODE_ARCH: x64
outputs:
BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
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@v2
uses: egor-tensin/setup-gcc@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
with:
version: 10
platform: x64
if: env.SHOULD_BUILD == 'yes'
- name: Setup Node.js environment
uses: actions/setup-node@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
node-version-file: .nvmrc
if: env.SHOULD_BUILD == 'yes'
- name: Setup Python 3
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
python-version: "3.11"
if: env.SHOULD_BUILD == 'yes'
- name: Install libkrb5-dev
@@ -123,8 +94,8 @@ jobs:
- name: Build
env:
SHOULD_BUILD_REH: 'no'
SHOULD_BUILD_REH_WEB: 'no'
SHOULD_BUILD_REH: no
SHOULD_BUILD_REH_WEB: no
run: ./build.sh
if: env.SHOULD_BUILD == 'yes'
@@ -137,11 +108,11 @@ jobs:
if: env.SHOULD_BUILD == 'yes'
- name: Upload vscode artifact
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: vscode
path: ./vscode.tar.gz
retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }}
retention-days: 30
if: env.SHOULD_BUILD == 'yes'
build:
@@ -149,6 +120,9 @@ jobs:
- check
- compile
runs-on: ubuntu-latest
environment: publish
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@@ -185,29 +159,22 @@ jobs:
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 }}
SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }}
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@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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
persist-credentials: false
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- name: Install GH
run: ./build/linux/install_gh.sh
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- name: Check existing VSCodium tags/releases
env:
@@ -221,11 +188,11 @@ jobs:
run: ./build/linux/deps.sh
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- name: Download vscode artifact
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
@@ -246,36 +213,30 @@ jobs:
VSCODE_SYSROOT_VERSION: ${{ steps.build.outputs.VSCODE_SYSROOT_VERSION }}
VSCODE_SYSROOT_PREFIX: ${{ steps.build.outputs.VSCODE_SYSROOT_PREFIX }}
run: ./prepare_assets.sh
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true')
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- 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'
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- name: Update versions repo
env:
FORCE_UPDATE: ${{ github.event.inputs.force_version }}
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./update_version.sh
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
- name: Upload assets
uses: actions/upload-artifact@v7
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'
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
reh_linux:
needs:
- check
- compile
runs-on: ubuntu-22.04
environment: publish
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@@ -308,37 +269,31 @@ jobs:
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'
if: needs.check.outputs.SHOULD_BUILD == 'yes'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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
persist-credentials: false
if: env.DISABLED != 'yes'
- name: Setup GCC
uses: egor-tensin/setup-gcc@v2
uses: egor-tensin/setup-gcc@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
with:
version: 10
platform: x64
if: env.DISABLED != 'yes'
- name: Setup Node.js environment
uses: actions/setup-node@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
if: env.DISABLED != 'yes'
- name: Setup Python 3
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
if: env.DISABLED != 'yes'
@@ -349,7 +304,7 @@ jobs:
- name: Install GH
run: ./build/linux/install_gh.sh
if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.DISABLED != 'yes'
- name: Check existing VSCodium tags/releases
env:
@@ -359,38 +314,33 @@ jobs:
if: env.DISABLED != 'yes'
- name: Download vscode artifact
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true')
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
- 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')
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
- 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@v7
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'
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
reh_alpine:
needs:
- check
- compile
runs-on: ubuntu-22.04
environment: publish
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@@ -409,34 +359,28 @@ jobs:
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'
if: needs.check.outputs.SHOULD_BUILD == 'yes'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh
persist-credentials: false
- name: Setup GCC
uses: egor-tensin/setup-gcc@v2
uses: egor-tensin/setup-gcc@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
with:
version: 10
platform: x64
- name: Setup Node.js environment
uses: actions/setup-node@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- name: Install GH
run: ./build/linux/install_gh.sh
if: env.SHOULD_DEPLOY == 'yes'
- name: Check existing VSCodium tags/releases
env:
@@ -449,45 +393,38 @@ jobs:
if: env.SHOULD_BUILD == 'yes'
- name: Download vscode artifact
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true')
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
- 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')
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
- 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@v7
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'
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
aur:
needs:
- check
- build
runs-on: ubuntu-latest
environment: publish
permissions: {}
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
@@ -496,7 +433,7 @@ jobs:
run: echo "PACKAGE_VERSION=${RELEASE_VERSION/-*/}" >> "${GITHUB_ENV}"
- name: Publish ${{ matrix.package_name }}
uses: zokugun/github-actions-aur-releaser@v1
uses: zokugun/github-actions-aur-releaser@4348c8a4124434a85d0a5e7457d0ef4079dab490 # v1
with:
package_name: ${{ matrix.package_name }}
package_version: ${{ env.PACKAGE_VERSION }}
@@ -509,6 +446,9 @@ jobs:
- check
- build
runs-on: ubuntu-latest
environment: publish
permissions:
contents: write
env:
RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }}
SNAP_NAME: codium-insiders
@@ -518,21 +458,17 @@ jobs:
platform:
- amd64
- arm64
if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && needs.check.outputs.SHOULD_BUILD_SNAP != 'no' && vars.DISABLE_INSIDER_SNAP != 'yes'
if: needs.check.outputs.SHOULD_BUILD_SNAP != 'no' && vars.DISABLE_INSIDER_SNAP != 'yes'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh
- uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- uses: docker/setup-qemu-action@v4
- uses: diddlesnaps/snapcraft-multiarch-action@v1
- uses: diddlesnaps/snapcraft-multiarch-action@cfd7a246fad6bea65bb92f69a1c8d07898c231e5 # v1.9.0
with:
path: stores/snapcraft/insider
architecture: ${{ matrix.platform }}
@@ -543,7 +479,7 @@ jobs:
# snap: ${{ steps.build.outputs.snap }}
# isClassic: 'true'
- uses: svenstaro/upload-release-action@v2
- uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # latest
with:
repo_name: ${{ env.ASSETS_REPOSITORY }}
repo_token: ${{ secrets.STRONGER_GITHUB_TOKEN }}
@@ -555,11 +491,12 @@ jobs:
- check
- build
runs-on: ubuntu-latest
if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && github.event.inputs.generate_assets != 'true'
environment: publish
permissions: {}
steps:
- name: Trigger repository rebuild
uses: peter-evans/repository-dispatch@v4
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
with:
token: ${{ secrets.STRONGER_GITHUB_TOKEN }}
repository: VSCodium/repositories-linux

View File

@@ -1,35 +1,17 @@
name: insider-macos
name: Publish - 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
workflow_dispatch: {}
repository_dispatch:
types: [insider]
push:
branches: [ insider ]
paths-ignore:
- '**/*.md'
- 'upstream/*.json'
pull_request:
branches: [ insider ]
paths-ignore:
- '**/*.md'
types:
- publish-insider
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 }}
GITHUB_BRANCH: insider
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: osx
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
@@ -38,6 +20,9 @@ env:
jobs:
build:
runs-on: ${{ matrix.runner }}
environment: publish
permissions:
contents: write
env:
VSCODE_ARCH: ${{ matrix.vscode_arch }}
strategy:
@@ -50,39 +35,29 @@ jobs:
vscode_arch: arm64
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: . get_pr.sh
persist-credentials: false
- name: Setup Node.js environment
uses: actions/setup-node@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
node-version-file: .nvmrc
- name: Setup Python 3
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
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:
@@ -98,30 +73,21 @@ jobs:
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')
if: env.SHOULD_BUILD == 'yes'
- 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'
if: env.SHOULD_BUILD == 'yes'
- name: Update versions repo
env:
FORCE_UPDATE: ${{ github.event.inputs.force_version }}
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./update_version.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
- name: Upload assets
uses: actions/upload-artifact@v7
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'
if: env.SHOULD_BUILD == 'yes'
- name: Clean up keychain
if: always()

View File

@@ -0,0 +1,122 @@
name: Publish - Insider - Spearhead
on:
workflow_dispatch:
inputs:
new_release:
type: boolean
description: Force new Release
dont_update:
type: boolean
description: Don't update VSCode
dont_dispatch:
type: boolean
description: Disable dispatch
schedule:
- cron: 0 7 * * *
env:
APP_NAME: VSCodium
ASSETS_REPOSITORY: ${{ github.repository }}-insiders
BINARY_NAME: codium-insiders
GH_REPO_PATH: ${{ github.repository }}
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: osx
SOURCEMAPS_REPOSITORY: ${{ github.repository_owner }}/sourcemaps
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
VSCODE_ARCH: arm64
VSCODE_LATEST: ${{ github.event.inputs.dont_update == 'true' && 'no' || 'yes' }}
VSCODE_QUALITY: insider
jobs:
check:
runs-on: macos-15
permissions: {}
outputs:
MS_COMMIT: ${{ env.MS_COMMIT }}
MS_TAG: ${{ env.MS_TAG }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
SHOULD_BUILD: ${{ env.SHOULD_BUILD }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: insider
persist-credentials: false
- 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
build:
needs:
- check
runs-on: macos-15
environment: publish
permissions:
contents: write # Release
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 }}
if: needs.check.outputs.SHOULD_BUILD == 'yes'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: insider
persist-credentials: false
- name: Setup Node.js environment
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- name: Clone VSCode repo
run: . get_repo.sh
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./build.sh
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
if: github.event.inputs.dont_update != 'true'
- name: Update upstream version
run: ./update_upstream.sh
if: github.event.inputs.dont_update != 'true'
- name: Prepare source
run: ./prepare_src.sh
- name: Upload sourcemaps
env:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./upload_sourcemaps.sh
- name: Release source
env:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./release.sh
- name: Dispatch builds
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
with:
event-type: publish-insider
if: github.event.inputs.dont_dispatch != 'true'

View File

@@ -1,35 +1,17 @@
name: insider-windows
name: Publish - 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
workflow_dispatch: {}
repository_dispatch:
types: [insider]
push:
branches: [ insider ]
paths-ignore:
- '**/*.md'
- 'upstream/*.json'
pull_request:
branches: [ insider ]
paths-ignore:
- '**/*.md'
types:
- publish-insider
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 }}
GITHUB_BRANCH: insider
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: windows
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
@@ -38,41 +20,33 @@ env:
jobs:
check:
runs-on: ubuntu-latest
permissions: {}
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@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh
persist-credentials: false
- 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'
CHECK_ALL: yes
run: ./check_tags.sh
compile:
needs:
- check
runs-on: windows-2022
permissions: {}
defaults:
run:
shell: bash
@@ -80,52 +54,38 @@ jobs:
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'
SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }}
VSCODE_ARCH: x64
outputs:
BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
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@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
node-version-file: .nvmrc
if: env.SHOULD_BUILD == 'yes'
- name: Setup Python 3
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
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'
SHOULD_BUILD_REH: no
SHOULD_BUILD_REH_WEB: no
run: ./build.sh
if: env.SHOULD_BUILD == 'yes'
@@ -138,11 +98,11 @@ jobs:
if: env.SHOULD_BUILD == 'yes'
- name: Upload vscode artifact
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: vscode
path: ./vscode.tar.gz
retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }}
retention-days: 30
if: env.SHOULD_BUILD == 'yes'
build:
@@ -150,6 +110,9 @@ jobs:
- check
- compile
runs-on: windows-2022
environment: publish
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@@ -164,33 +127,26 @@ jobs:
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 }}
SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }}
VSCODE_ARCH: ${{ matrix.vscode_arch }}
outputs:
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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
persist-credentials: false
if: env.SHOULD_BUILD == 'yes'
- name: Setup Node.js environment
uses: actions/setup-node@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
if: env.SHOULD_BUILD == 'yes'
- name: Setup Python 3
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
if: env.SHOULD_BUILD == 'yes'
@@ -203,7 +159,7 @@ jobs:
if: env.SHOULD_BUILD == 'yes'
- name: Download vscode artifact
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode
if: env.SHOULD_BUILD == 'yes'
@@ -218,21 +174,21 @@ jobs:
- name: Prepare assets
run: ./prepare_assets.sh
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true')
if: env.SHOULD_BUILD == 'yes'
- name: Upload unsigned artifacts
id: upload-unsigned-artifacts
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
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')
if: env.SHOULD_BUILD == 'yes' && vars.DISABLE_INSIDER_WINDOWS_SIGNING != 'yes'
- name: Signing
uses: signpath/github-action-submit-signing-request@v2
uses: signpath/github-action-submit-signing-request@b9d91eadd323de506c0c81cf0c7fe7438f3360fd # v2.2
with:
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }}
@@ -242,52 +198,46 @@ jobs:
artifact-configuration-slug: ${{ matrix.vscode_arch }}
wait-for-completion: true
# 3h to manually approve the request
wait-for-completion-timeout-in-seconds: 10800
wait-for-completion-timeout-in-seconds: 28800
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')
if: env.SHOULD_BUILD == 'yes' && vars.DISABLE_INSIDER_WINDOWS_SIGNING != 'yes'
- name: Prepare checksums
run: ./prepare_checksums.sh
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true')
if: env.SHOULD_BUILD == 'yes'
- 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'
if: env.SHOULD_BUILD == 'yes'
- name: Update versions repo
env:
FORCE_UPDATE: ${{ github.event.inputs.force_version }}
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./update_version.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
- name: Upload assets
uses: actions/upload-artifact@v7
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'
if: env.SHOULD_BUILD == 'yes'
winget:
needs: build
runs-on: windows-2022
environment: publish
permissions:
contents: write
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@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
- name: Check version
run: ./stores/winget/check_version.sh
@@ -295,7 +245,7 @@ jobs:
RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }}
- name: Release to WinGet
uses: vedantmgoyal9/winget-releaser@main
uses: vedantmgoyal9/winget-releaser@4ffc7888bffd451b357355dc214d43bb9f23917e
with:
identifier: ${{ env.APP_IDENTIFIER }}
version: ${{ env.RELEASE_VERSION }}

View File

@@ -1,39 +1,19 @@
name: stable-linux
name: Publish - Stable - Linux
on:
workflow_dispatch:
inputs:
force_version:
type: boolean
description: Force update version
generate_assets:
type: boolean
description: Generate assets
force_snap:
type: boolean
description: Force Snap
checkout_pr:
type: string
description: Checkout PR
workflow_dispatch: {}
repository_dispatch:
types: [stable]
push:
branches: [ master ]
paths-ignore:
- '**/*.md'
- 'upstream/*.json'
pull_request:
branches: [ master ]
paths-ignore:
- '**/*.md'
types:
- publish-stable
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
APP_NAME: VSCodium
ASSETS_REPOSITORY: ${{ github.repository }}
BINARY_NAME: codium
DISABLE_UPDATE: 'yes'
DISABLE_UPDATE: yes
GH_REPO_PATH: ${{ github.repository }}
GITHUB_BRANCH: master
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: linux
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
@@ -42,35 +22,26 @@ env:
jobs:
check:
runs-on: ubuntu-latest
permissions: {}
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@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh
persist-credentials: false
- 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'
CHECK_ALL: yes
FORCE_LINUX_SNAP: ${{ github.event.inputs.force_snap }}
run: ./check_tags.sh
@@ -78,44 +49,40 @@ jobs:
needs:
- check
runs-on: ubuntu-22.04
permissions: {}
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'
SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }}
VSCODE_ARCH: x64
outputs:
BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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
persist-credentials: false
if: env.SHOULD_BUILD == 'yes'
- name: Setup GCC
uses: egor-tensin/setup-gcc@v2
uses: egor-tensin/setup-gcc@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
with:
version: 10
platform: x64
if: env.SHOULD_BUILD == 'yes'
- name: Setup Node.js environment
uses: actions/setup-node@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
node-version-file: .nvmrc
if: env.SHOULD_BUILD == 'yes'
- name: Setup Python 3
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
python-version: "3.11"
if: env.SHOULD_BUILD == 'yes'
- name: Install libkrb5-dev
@@ -128,8 +95,8 @@ jobs:
- name: Build
env:
SHOULD_BUILD_REH: 'no'
SHOULD_BUILD_REH_WEB: 'no'
SHOULD_BUILD_REH: no
SHOULD_BUILD_REH_WEB: no
run: ./build.sh
if: env.SHOULD_BUILD == 'yes'
@@ -142,11 +109,11 @@ jobs:
if: env.SHOULD_BUILD == 'yes'
- name: Upload vscode artifact
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: vscode
path: ./vscode.tar.gz
retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }}
retention-days: 30
if: env.SHOULD_BUILD == 'yes'
build:
@@ -154,6 +121,9 @@ jobs:
- check
- compile
runs-on: ubuntu-latest
environment: publish
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@@ -190,29 +160,22 @@ jobs:
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 }}
SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }}
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@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
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: ./build/linux/install_gh.sh
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- name: Check existing VSCodium tags/releases
env:
@@ -226,11 +189,11 @@ jobs:
run: ./build/linux/deps.sh
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- uses: actions-rust-lang/setup-rust-toolchain@v1
- uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- name: Download vscode artifact
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
@@ -251,36 +214,30 @@ jobs:
VSCODE_SYSROOT_VERSION: ${{ steps.build.outputs.VSCODE_SYSROOT_VERSION }}
VSCODE_SYSROOT_PREFIX: ${{ steps.build.outputs.VSCODE_SYSROOT_PREFIX }}
run: ./prepare_assets.sh
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true')
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- 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'
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
- name: Update versions repo
env:
FORCE_UPDATE: ${{ github.event.inputs.force_version }}
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./update_version.sh
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
- name: Upload assets
uses: actions/upload-artifact@v7
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'
if: env.DISABLED != 'yes' && env.SHOULD_BUILD == 'yes'
reh_linux:
needs:
- check
- compile
runs-on: ubuntu-22.04
environment: publish
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@@ -313,37 +270,31 @@ jobs:
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'
if: needs.check.outputs.SHOULD_BUILD == 'yes'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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
persist-credentials: false
if: env.DISABLED != 'yes'
- name: Setup GCC
uses: egor-tensin/setup-gcc@v2
uses: egor-tensin/setup-gcc@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
with:
version: 10
platform: x64
if: env.DISABLED != 'yes'
- name: Setup Node.js environment
uses: actions/setup-node@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
if: env.DISABLED != 'yes'
- name: Setup Python 3
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
if: env.DISABLED != 'yes'
@@ -354,7 +305,7 @@ jobs:
- name: Install GH
run: ./build/linux/install_gh.sh
if: env.DISABLED != 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.DISABLED != 'yes'
- name: Check existing VSCodium tags/releases
env:
@@ -364,38 +315,33 @@ jobs:
if: env.DISABLED != 'yes'
- name: Download vscode artifact
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true')
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
- 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')
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
- 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@v7
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'
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
reh_alpine:
needs:
- check
- compile
runs-on: ubuntu-22.04
environment: publish
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@@ -414,34 +360,28 @@ jobs:
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'
if: needs.check.outputs.SHOULD_BUILD == 'yes'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh
persist-credentials: false
- name: Setup GCC
uses: egor-tensin/setup-gcc@v2
uses: egor-tensin/setup-gcc@a2861a8b8538f49cf2850980acccf6b05a1b2ae4 # v2.0
with:
version: 10
platform: x64
- name: Setup Node.js environment
uses: actions/setup-node@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- name: Install GH
run: ./build/linux/install_gh.sh
if: env.SHOULD_DEPLOY == 'yes'
- name: Check existing VSCodium tags/releases
env:
@@ -454,51 +394,42 @@ jobs:
if: env.SHOULD_BUILD == 'yes'
- name: Download vscode artifact
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no' || github.event.inputs.generate_assets == 'true')
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
- 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')
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
- 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@v7
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'
if: env.DISABLED != 'yes' && (env.SHOULD_BUILD_REH != 'no' || env.SHOULD_BUILD_REH_WEB != 'no')
aur:
needs:
- check
- build
runs-on: ubuntu-latest
environment: publish
permissions: {}
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
uses: zokugun/github-actions-aur-releaser@4348c8a4124434a85d0a5e7457d0ef4079dab490 # v1
with:
package_name: ${{ matrix.package_name }}
package_type: ${{ matrix.package_type }}
@@ -511,6 +442,8 @@ jobs:
- check
- build
runs-on: ubuntu-latest
environment: publish
permissions: {}
env:
RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }}
SNAP_NAME: codium
@@ -521,17 +454,13 @@ jobs:
platform:
- amd64
- arm64
if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && needs.check.outputs.SHOULD_BUILD_SNAP != 'no' && vars.DISABLE_STABLE_SNAP != 'yes'
if: needs.check.outputs.SHOULD_BUILD_SNAP != 'no' && vars.DISABLE_STABLE_SNAP != 'yes'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh
persist-credentials: false
- name: Check version
env:
@@ -541,23 +470,21 @@ jobs:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
run: ./stores/snapcraft/check_version.sh
- uses: docker/setup-qemu-action@v4
if: env.SHOULD_BUILD == 'yes'
- uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- uses: diddlesnaps/snapcraft-multiarch-action@v1
- uses: diddlesnaps/snapcraft-multiarch-action@cfd7a246fad6bea65bb92f69a1c8d07898c231e5 # v1.9.0
with:
path: stores/snapcraft/stable
architecture: ${{ matrix.platform }}
id: build
if: env.SHOULD_BUILD == 'yes'
- uses: diddlesnaps/snapcraft-review-action@v1
- uses: diddlesnaps/snapcraft-review-action@40554b42331cf84dab19ef98c382620427f13482 # v1.3.1
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
- uses: svenstaro/upload-release-action@29e53e917877a24fad85510ded594ab3c9ca12de # latest
with:
repo_name: ${{ env.ASSETS_REPOSITORY }}
repo_token: ${{ secrets.STRONGER_GITHUB_TOKEN }}
@@ -565,7 +492,7 @@ jobs:
tag: ${{ env.RELEASE_VERSION }}
if: env.SHOULD_DEPLOY_TO_RELEASE == 'yes'
- uses: snapcore/action-publish@master
- uses: snapcore/action-publish@214b86e5ca036ead1668c79afb81e550e6c54d40
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_STORE_LOGIN }}
with:
@@ -578,7 +505,8 @@ jobs:
- check
- build
runs-on: ubuntu-latest
if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && github.event.inputs.generate_assets != 'true'
environment: publish
permissions: {}
steps:
- name: Trigger repository rebuild
@@ -591,11 +519,12 @@ jobs:
- check
- build
runs-on: ubuntu-latest
if: needs.check.outputs.SHOULD_DEPLOY == 'yes' && github.event.inputs.generate_assets != 'true'
environment: publish
permissions: {}
steps:
- name: Trigger repository rebuild
uses: peter-evans/repository-dispatch@v4
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
with:
token: ${{ secrets.STRONGER_GITHUB_TOKEN }}
repository: VSCodium/repositories-linux

View File

@@ -1,34 +1,17 @@
name: stable-macos
name: Publish - 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
workflow_dispatch: {}
repository_dispatch:
types: [stable]
push:
branches: [ master ]
paths-ignore:
- '**/*.md'
- 'upstream/*.json'
pull_request:
branches: [ master ]
paths-ignore:
- '**/*.md'
types:
- publish-stable
env:
APP_NAME: VSCodium
ASSETS_REPOSITORY: ${{ github.repository }}
BINARY_NAME: codium
GH_REPO_PATH: ${{ github.repository }}
GITHUB_BRANCH: master
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: osx
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
@@ -37,6 +20,9 @@ env:
jobs:
build:
runs-on: ${{ matrix.runner }}
environment: publish
permissions:
contents: write
env:
VSCODE_ARCH: ${{ matrix.vscode_arch }}
strategy:
@@ -49,39 +35,29 @@ jobs:
vscode_arch: arm64
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: . get_pr.sh
persist-credentials: false
- name: Setup Node.js environment
uses: actions/setup-node@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
node-version-file: .nvmrc
- name: Setup Python 3
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
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:
@@ -97,29 +73,20 @@ jobs:
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')
if: env.SHOULD_BUILD == 'yes'
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./release.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.SHOULD_BUILD == 'yes'
- name: Update versions repo
env:
FORCE_UPDATE: ${{ github.event.inputs.force_version }}
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./update_version.sh
if: env.SHOULD_DEPLOY == 'yes'
- name: Upload assets
uses: actions/upload-artifact@v7
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'
if: env.SHOULD_BUILD == 'yes'
- name: Clean up keychain
if: always()

View File

@@ -0,0 +1,122 @@
name: Publish - Stable - Spearhead
on:
workflow_dispatch:
inputs:
new_release:
type: boolean
description: Force new Release
dont_update:
type: boolean
description: Don't update VSCode
dont_dispatch:
type: boolean
description: Disable dispatch
schedule:
- cron: 0 18 * * *
env:
APP_NAME: VSCodium
ASSETS_REPOSITORY: ${{ github.repository }}
BINARY_NAME: codium
GH_REPO_PATH: ${{ github.repository }}
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: osx
SOURCEMAPS_REPOSITORY: ${{ github.repository_owner }}/sourcemaps
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
VSCODE_ARCH: arm64
VSCODE_LATEST: ${{ github.event.inputs.dont_update == 'true' && 'no' || 'yes' }}
VSCODE_QUALITY: stable
jobs:
check:
runs-on: macos-15
permissions: {}
outputs:
MS_COMMIT: ${{ env.MS_COMMIT }}
MS_TAG: ${{ env.MS_TAG }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
SHOULD_BUILD: ${{ env.SHOULD_BUILD }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: master
persist-credentials: false
- 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
build:
needs:
- check
runs-on: macos-15
environment: publish
permissions:
contents: write # Release
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 }}
if: needs.check.outputs.SHOULD_BUILD == 'yes'
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: master
persist-credentials: false
- name: Setup Node.js environment
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- name: Clone VSCode repo
run: . get_repo.sh
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./build.sh
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@2dc316deee8e90f13e1a351ab510b4d5bc0c82cd # v7.0.0
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
if: github.event.inputs.dont_update != 'true'
- name: Update upstream version
run: ./update_upstream.sh
if: github.event.inputs.dont_update != 'true'
- name: Prepare source
run: ./prepare_src.sh
- name: Upload sourcemaps
env:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./upload_sourcemaps.sh
- name: Release source
env:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./release.sh
- name: Dispatch builds
uses: peter-evans/repository-dispatch@28959ce8df70de7be546dd1250a005dd32156697 # v4.0.1
with:
event-type: publish-stable
if: github.event.inputs.dont_dispatch != 'true'

View File

@@ -1,34 +1,17 @@
name: stable-windows
name: Publish - 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
workflow_dispatch: {}
repository_dispatch:
types: [stable]
push:
branches: [ master ]
paths-ignore:
- '**/*.md'
- 'upstream/*.json'
pull_request:
branches: [ master ]
paths-ignore:
- '**/*.md'
types:
- publish-stable
env:
APP_NAME: VSCodium
ASSETS_REPOSITORY: ${{ github.repository }}
BINARY_NAME: codium
GH_REPO_PATH: ${{ github.repository }}
GITHUB_BRANCH: master
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: windows
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/versions
@@ -37,41 +20,33 @@ env:
jobs:
check:
runs-on: ubuntu-latest
permissions: {}
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@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Switch to relevant branch
env:
PULL_REQUEST_ID: ${{ github.event.inputs.checkout_pr }}
run: ./get_pr.sh
persist-credentials: false
- 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'
CHECK_ALL: yes
run: ./check_tags.sh
compile:
needs:
- check
runs-on: windows-2022
permissions: {}
defaults:
run:
shell: bash
@@ -79,52 +54,38 @@ jobs:
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'
SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }}
VSCODE_ARCH: x64
outputs:
BUILD_SOURCEVERSION: ${{ env.BUILD_SOURCEVERSION }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
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@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
node-version-file: .nvmrc
if: env.SHOULD_BUILD == 'yes'
- name: Setup Python 3
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
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'
SHOULD_BUILD_REH: no
SHOULD_BUILD_REH_WEB: no
run: ./build.sh
if: env.SHOULD_BUILD == 'yes'
@@ -137,11 +98,11 @@ jobs:
if: env.SHOULD_BUILD == 'yes'
- name: Upload vscode artifact
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: vscode
path: ./vscode.tar.gz
retention-days: ${{ needs.check.outputs.SHOULD_DEPLOY == 'yes' && 30 || 1 }}
retention-days: 30
if: env.SHOULD_BUILD == 'yes'
build:
@@ -149,6 +110,9 @@ jobs:
- check
- compile
runs-on: windows-2022
environment: publish
permissions:
contents: write
strategy:
fail-fast: false
matrix:
@@ -163,33 +127,26 @@ jobs:
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 }}
SHOULD_BUILD: ${{ needs.check.outputs.SHOULD_BUILD }}
VSCODE_ARCH: ${{ matrix.vscode_arch }}
outputs:
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
SHOULD_DEPLOY: ${{ env.SHOULD_DEPLOY }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
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
persist-credentials: false
if: env.SHOULD_BUILD == 'yes'
- name: Setup Node.js environment
uses: actions/setup-node@v6
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
if: env.SHOULD_BUILD == 'yes'
- name: Setup Python 3
uses: actions/setup-python@v6
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.11'
if: env.SHOULD_BUILD == 'yes'
@@ -202,7 +159,7 @@ jobs:
if: env.SHOULD_BUILD == 'yes'
- name: Download vscode artifact
uses: actions/download-artifact@v8
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: vscode
if: env.SHOULD_BUILD == 'yes'
@@ -217,21 +174,21 @@ jobs:
- name: Prepare assets
run: ./prepare_assets.sh
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true')
if: env.SHOULD_BUILD == 'yes'
- name: Upload unsigned artifacts
id: upload-unsigned-artifacts
uses: actions/upload-artifact@v7
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
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')
if: env.SHOULD_BUILD == 'yes'
- name: Signing
uses: signpath/github-action-submit-signing-request@v2
uses: signpath/github-action-submit-signing-request@b9d91eadd323de506c0c81cf0c7fe7438f3360fd # v2.2
with:
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }}
@@ -243,48 +200,42 @@ jobs:
# 8h to manually approve the request
wait-for-completion-timeout-in-seconds: 28800
output-artifact-directory: assets/
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true')
if: env.SHOULD_BUILD == 'yes'
- name: Prepare checksums
run: ./prepare_checksums.sh
if: env.SHOULD_BUILD == 'yes' && (env.SHOULD_DEPLOY == 'yes' || github.event.inputs.generate_assets == 'true')
if: env.SHOULD_BUILD == 'yes'
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./release.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
if: env.SHOULD_BUILD == 'yes'
- name: Update versions repo
env:
FORCE_UPDATE: ${{ github.event.inputs.force_version }}
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./update_version.sh
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
- name: Upload assets
uses: actions/upload-artifact@v7
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'
if: env.SHOULD_BUILD == 'yes'
winget:
needs: build
runs-on: windows-2022
environment: publish
permissions:
contents: write
defaults:
run:
shell: bash
env:
APP_IDENTIFIER: VSCodium.VSCodium
if: needs.build.outputs.SHOULD_DEPLOY == 'yes'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.GITHUB_BRANCH }}
persist-credentials: false
- name: Check version
run: ./stores/winget/check_version.sh
@@ -292,7 +243,7 @@ jobs:
RELEASE_VERSION: ${{ needs.build.outputs.RELEASE_VERSION }}
- name: Release to WinGet
uses: vedantmgoyal9/winget-releaser@main
uses: vedantmgoyal9/winget-releaser@4ffc7888bffd451b357355dc214d43bb9f23917e
with:
identifier: ${{ env.APP_IDENTIFIER }}
version: ${{ env.RELEASE_VERSION }}

View File

@@ -1,93 +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-15
env:
APP_NAME: VSCodium
ASSETS_REPOSITORY: ${{ github.repository }}
BINARY_NAME: codium
GH_REPO_PATH: ${{ github.repository }}
ORG_NAME: ${{ github.repository_owner }}
OS_NAME: osx
SOURCEMAPS_REPOSITORY: ${{ github.repository_owner }}/sourcemaps
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@v6
- name: Setup Node.js environment
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- 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@v7
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: Upload sourcemaps
env:
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}
run: ./upload_sourcemaps.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@v4
with:
event-type: stable
if: env.SHOULD_BUILD == 'yes' || github.event.inputs.force_dispatch == 'true'

View File

@@ -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@v10
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

10
justfile Normal file
View File

@@ -0,0 +1,10 @@
set shell := ["bash", "-uc"]
ci-lint:
zizmor .
ci-lint-fix:
zizmor . --fix=all
ci-update:
PINACT_MIN_AGE=7 pinact run

View File

@@ -49,17 +49,18 @@ index bc90a03..f8885b9 100644
+ | "user";
\ No newline at end of file
diff --git a/src/vs/platform/update/electron-main/abstractUpdateService.ts b/src/vs/platform/update/electron-main/abstractUpdateService.ts
index c943bca..1395594 100644
index c943bca..d216af7 100644
--- a/src/vs/platform/update/electron-main/abstractUpdateService.ts
+++ b/src/vs/platform/update/electron-main/abstractUpdateService.ts
@@ -17,4 +17,4 @@ import { ILogService } from '../../log/common/log.js';
@@ -17,4 +17,5 @@ import { ILogService } from '../../log/common/log.js';
import { IProductService } from '../../product/common/productService.js';
-import { IRequestService } from '../../request/common/request.js';
-import { AvailableForDownload, DisablementReason, IUpdateService, State, StateType, UpdateType } from '../common/update.js';
+import { IRequestService, NO_FETCH_TELEMETRY } from '../../request/common/request.js';
+import { Architecture, AvailableForDownload, DisablementReason, IUpdateService, Platform, State, StateType, Target, UpdateType } from '../common/update.js';
+import { asJson, IRequestService, NO_FETCH_TELEMETRY } from '../../request/common/request.js';
+import { Architecture, AvailableForDownload, DisablementReason, IUpdate, IUpdateService, Platform, State, StateType, Target, UpdateType } from '../common/update.js';
+import * as semver from 'semver';
@@ -25,12 +25,8 @@ export interface IUpdateURLOptions {
@@ -25,12 +26,8 @@ export interface IUpdateURLOptions {
-export function createUpdateURL(baseUpdateUrl: string, platform: string, quality: string, commit: string, options?: IUpdateURLOptions): string {
- const url = new URL(`${baseUpdateUrl}/api/update/${platform}/${quality}/${commit}`);
@@ -77,18 +78,64 @@ index c943bca..1395594 100644
-
- return url.toString();
}
@@ -322,3 +318,3 @@ export abstract class AbstractUpdateService implements IUpdateService {
@@ -322,3 +319,3 @@ export abstract class AbstractUpdateService implements IUpdateService {
- if (mode === 'none') {
+ if (mode === 'none' || mode === 'manual') {
return undefined;
@@ -336,3 +332,3 @@ export abstract class AbstractUpdateService implements IUpdateService {
try {
@@ -332,18 +329,37 @@ export abstract class AbstractUpdateService implements IUpdateService {
+ return this._isLatestVersion(url, false)
+ .then((result) => {
+ return Promise.resolve(result ? result.lastest : result);
+ })
+ .then(undefined, (error) => {
+ this.logService.error('update#isLatestVersion(): failed to check for updates');
+ this.logService.error(error);
+
+ return Promise.resolve(undefined);
+ });
+ }
+
+ _isLatestVersion(url: string, explicit: boolean): Promise<{lastest: boolean, update: IUpdate} | undefined> {
const headers = getUpdateRequestHeaders(this.productService.version);
- this.logService.trace('update#isLatestVersion() - checking update server', { url, headers });
- try {
- const context = await this.requestService.request({ url, headers, callSite: 'updateService.isLatestVersion' }, token);
+ const context = await this.requestService.request({ url, headers, callSite: NO_FETCH_TELEMETRY }, token);
const statusCode = context.res.statusCode;
- const statusCode = context.res.statusCode;
- this.logService.trace('update#isLatestVersion() - response', { statusCode });
- // The update server replies with 204 (No Content) when no
- // update is available - that's all we want to know.
- return statusCode === 204;
+ this.logService.info('update#isLatestVersion() - checking update server', { url, headers });
- } catch (error) {
- this.logService.error('update#isLatestVersion(): failed to check for updates');
- this.logService.error(error);
- return undefined;
- }
+ return this.requestService.request({ url, headers, callSite: NO_FETCH_TELEMETRY }, CancellationToken.None)
+ .then<IUpdate | null>(asJson)
+ .then(update => {
+ if (!update || !update.url || !update.version || !update.productVersion) {
+ this.setState(State.Idle(UpdateType.Setup, undefined, explicit || undefined));
+
+ return Promise.resolve(undefined);
+ }
+
+ const fetchedVersion = /\d+\.\d+\.\d+\.\d+/.test(update.productVersion) ? update.productVersion.replace(/(\d+\.\d+\.\d+)\.\d+(\-\w+)?/, '$1$2') : update.productVersion.replace(/(\d+\.\d+\.)0+(\d+)(\-\w+)?/, '$1$2$3');
+ const currentVersion = this.productService.version.replace(/(\d+\.\d+\.)0+(\d+)(\-\w+)?/, '$1$2$3');
+
+ this.logService.info('update#isLatestVersion() - found version', fetchedVersion, currentVersion);
+
+ const lastest = semver.compareBuild(currentVersion, fetchedVersion) >= 0;
+
+ return Promise.resolve({ lastest, update });
+ })
}
diff --git a/src/vs/platform/update/electron-main/updateService.darwin.ts b/src/vs/platform/update/electron-main/updateService.darwin.ts
index 40b38a2..323919e 100644
index 40b38a2..81f772d 100644
--- a/src/vs/platform/update/electron-main/updateService.darwin.ts
+++ b/src/vs/platform/update/electron-main/updateService.darwin.ts
@@ -16,3 +16,3 @@ import { ILogService } from '../../log/common/log.js';
@@ -96,11 +143,7 @@ index 40b38a2..323919e 100644
-import { asJson, IRequestService } from '../../request/common/request.js';
+import { asJson, IRequestService, NO_FETCH_TELEMETRY } from '../../request/common/request.js';
import { ITelemetryService } from '../../telemetry/common/telemetry.js';
@@ -22,2 +22,3 @@ import { AbstractUpdateService, createUpdateURL, getUpdateRequestHeaders, IUpdat
import { INodeProcess } from '../../../base/common/platform.js';
+import * as semver from 'semver';
@@ -99,15 +100,4 @@ export class DarwinUpdateService extends AbstractUpdateService implements IRelau
@@ -99,15 +99,4 @@ export class DarwinUpdateService extends AbstractUpdateService implements IRelau
- protected buildUpdateFeedUrl(quality: string, commit: string, options?: IUpdateURLOptions): string | undefined {
- const assetID = this.productService.darwinUniversalAssetId ?? (process.arch === 'x64' ? 'darwin' : 'darwin-arm64');
@@ -118,107 +161,127 @@ index 40b38a2..323919e 100644
+ protected buildUpdateFeedUrl(quality: string, _commit: string, _options?: IUpdateURLOptions): string | undefined {
+ return createUpdateURL(this.productService, quality, process.platform, process.arch);
}
@@ -154,3 +144,30 @@ export class DarwinUpdateService extends AbstractUpdateService implements IRelau
this.logService.trace('update#doCheckForUpdates - using Electron autoUpdater', { url, explicit, background });
@@ -153,4 +142,30 @@ export class DarwinUpdateService extends AbstractUpdateService implements IRelau
- this.logService.trace('update#doCheckForUpdates - using Electron autoUpdater', { url, explicit, background });
- electron.autoUpdater.checkForUpdates();
+ this.requestService.request({ url, callSite: NO_FETCH_TELEMETRY }, CancellationToken.None)
+ .then<IUpdate | null>(asJson)
+ .then(update => {
+ if (!update || !update.url || !update.version || !update.productVersion) {
+ this.setState(State.Idle(UpdateType.Setup, undefined, explicit || undefined));
+ this.logService.info('update#doCheckForUpdates', { url, explicit, background });
+
+ this._isLatestVersion(url, explicit)
+ .then((result) => {
+ if(!result) {
+ return Promise.resolve(null);
+ }
+
+ const fetchedVersion = /\d+\.\d+\.\d+\.\d+/.test(update.productVersion) ? update.productVersion.replace(/(\d+\.\d+\.\d+)\.\d+(\-\w+)?/, '$1$2') : update.productVersion.replace(/(\d+\.\d+\.)0+(\d+)(\-\w+)?/, '$1$2$3')
+ const currentVersion = this.productService.version.replace(/(\d+\.\d+\.)0+(\d+)(\-\w+)?/, '$1$2$3')
+
+ if(semver.compareBuild(currentVersion, fetchedVersion) >= 0) {
+ if(result.lastest) {
+ this.setState(State.Idle(UpdateType.Setup, undefined, explicit || undefined));
+ }
+ else {
+ this.logService.info('update#doCheckForUpdates - using Electron autoUpdater');
+
+ electron.autoUpdater.setFeedURL({ url });
+ electron.autoUpdater.checkForUpdates();
+ }
+
+ return Promise.resolve(null);
+ })
+ .then(undefined, err => {
+ this.logService.error(err);
+ .then(undefined, (error) => {
+ this.logService.error(error);
+
+ // only show message when explicitly checking for updates
+ const message: string | undefined = explicit ? (err.message || err) : undefined;
+ const message: string | undefined = explicit ? (error.message || error) : undefined;
+
+ this.setState(State.Idle(UpdateType.Setup, message));
+ });
}
@@ -167,3 +184,3 @@ export class DarwinUpdateService extends AbstractUpdateService implements IRelau
@@ -167,3 +182,3 @@ export class DarwinUpdateService extends AbstractUpdateService implements IRelau
try {
- const context = await this.requestService.request({ url, headers, callSite: 'updateService.darwin.checkForUpdates' }, CancellationToken.None);
+ const context = await this.requestService.request({ url, headers, callSite: NO_FETCH_TELEMETRY }, CancellationToken.None);
const statusCode = context.res.statusCode;
diff --git a/src/vs/platform/update/electron-main/updateService.linux.ts b/src/vs/platform/update/electron-main/updateService.linux.ts
index 0eb5d74..8ce708e 100644
index 0eb5d74..16bd215 100644
--- a/src/vs/platform/update/electron-main/updateService.linux.ts
+++ b/src/vs/platform/update/electron-main/updateService.linux.ts
@@ -13,5 +13,6 @@ import { INativeHostMainService } from '../../native/electron-main/nativeHostMai
@@ -5,3 +5,2 @@
-import { CancellationToken } from '../../../base/common/cancellation.js';
import { IConfigurationService } from '../../configuration/common/configuration.js';
@@ -13,4 +12,4 @@ import { INativeHostMainService } from '../../native/electron-main/nativeHostMai
import { IProductService } from '../../product/common/productService.js';
-import { asJson, IRequestService } from '../../request/common/request.js';
+import { asJson, IRequestService, NO_FETCH_TELEMETRY } from '../../request/common/request.js';
import { AvailableForDownload, IUpdate, State, UpdateType } from '../common/update.js';
-import { AvailableForDownload, IUpdate, State, UpdateType } from '../common/update.js';
+import { IRequestService } from '../../request/common/request.js';
+import { AvailableForDownload, State, UpdateType } from '../common/update.js';
import { AbstractUpdateService, createUpdateURL, IUpdateURLOptions } from './abstractUpdateService.js';
+import * as semver from 'semver';
@@ -32,4 +33,4 @@ export class LinuxUpdateService extends AbstractUpdateService {
@@ -32,4 +31,4 @@ export class LinuxUpdateService extends AbstractUpdateService {
- protected buildUpdateFeedUrl(quality: string, commit: string, options?: IUpdateURLOptions): string {
- return createUpdateURL(this.productService.updateUrl!, `linux-${process.arch}`, quality, commit, options);
+ protected buildUpdateFeedUrl(quality: string, _commit: string, _options?: IUpdateURLOptions): string {
+ return createUpdateURL(this.productService, quality, process.platform, process.arch);
}
@@ -46,3 +47,3 @@ export class LinuxUpdateService extends AbstractUpdateService {
@@ -41,2 +40,4 @@ export class LinuxUpdateService extends AbstractUpdateService {
+ this.setState(State.CheckingForUpdates(explicit));
+
const internalOrg = this.getInternalOrg();
@@ -44,17 +45,26 @@ export class LinuxUpdateService extends AbstractUpdateService {
const url = this.buildUpdateFeedUrl(this.quality, this.productService.commit!, { background, internalOrg });
- this.setState(State.CheckingForUpdates(explicit));
- this.requestService.request({ url, callSite: 'updateService.linux.checkForUpdates' }, CancellationToken.None)
+ this.requestService.request({ url, callSite: NO_FETCH_TELEMETRY }, CancellationToken.None)
.then<IUpdate | null>(asJson)
@@ -51,5 +52,17 @@ export class LinuxUpdateService extends AbstractUpdateService {
this.setState(State.Idle(UpdateType.Archive, undefined, explicit || undefined));
- } else {
- .then<IUpdate | null>(asJson)
- .then(update => {
- if (!update || !update.url || !update.version || !update.productVersion) {
+ this.logService.info('update#doCheckForUpdates', { url, explicit, background });
+
+ this._isLatestVersion(url, explicit)
+ .then((result) => {
+ if(!result) {
+ return Promise.resolve(null);
+ }
+
+ const fetchedVersion = /\d+\.\d+\.\d+\.\d+/.test(update.productVersion) ? update.productVersion.replace(/(\d+\.\d+\.\d+)\.\d+(\-\w+)?/, '$1$2') : update.productVersion.replace(/(\d+\.\d+\.)0+(\d+)(\-\w+)?/, '$1$2$3')
+ const currentVersion = this.productService.version.replace(/(\d+\.\d+\.)0+(\d+)(\-\w+)?/, '$1$2$3')
+
+ if(semver.compareBuild(currentVersion, fetchedVersion) >= 0) {
+ this.setState(State.Idle(UpdateType.Archive, undefined, explicit || undefined));
+ }
+ else {
this.setState(State.AvailableForDownload(update));
+ if(result.lastest) {
this.setState(State.Idle(UpdateType.Archive, undefined, explicit || undefined));
- } else {
- this.setState(State.AvailableForDownload(update));
}
+ else {
+ this.setState(State.AvailableForDownload(result.update));
+ }
+
+ return Promise.resolve(null);
})
- .then(undefined, err => {
- this.logService.error(err);
+ .then(undefined, (error) => {
+ this.logService.error(error);
+
// only show message when explicitly checking for updates
- const message: string | undefined = explicit ? (err.message || err) : undefined;
+ const message: string | undefined = explicit ? (error.message || error) : undefined;
+
this.setState(State.Idle(UpdateType.Archive, message));
diff --git a/src/vs/platform/update/electron-main/updateService.win32.ts b/src/vs/platform/update/electron-main/updateService.win32.ts
index d02d7c3..4e8c541 100644
index d02d7c3..d934da1 100644
--- a/src/vs/platform/update/electron-main/updateService.win32.ts
+++ b/src/vs/platform/update/electron-main/updateService.win32.ts
@@ -14,3 +14,2 @@ import { CancellationToken, CancellationTokenSource } from '../../../base/common
import { memoize } from '../../../base/common/decorators.js';
-import { hash } from '../../../base/common/hash.js';
import * as path from '../../../base/common/path.js';
@@ -31,7 +30,8 @@ import { INativeHostMainService } from '../../native/electron-main/nativeHostMai
@@ -31,6 +30,6 @@ import { INativeHostMainService } from '../../native/electron-main/nativeHostMai
import { IProductService } from '../../product/common/productService.js';
-import { asJson, IRequestService } from '../../request/common/request.js';
+import { asJson, IRequestService, NO_FETCH_TELEMETRY } from '../../request/common/request.js';
+import { IRequestService, NO_FETCH_TELEMETRY } from '../../request/common/request.js';
import { ITelemetryService } from '../../telemetry/common/telemetry.js';
-import { AvailableForDownload, DisablementReason, IUpdate, State, StateType, UpdateType } from '../common/update.js';
-import { AbstractUpdateService, createUpdateURL, getUpdateRequestHeaders, IUpdateURLOptions, UpdateErrorClassification } from './abstractUpdateService.js';
+import { AvailableForDownload, DisablementReason, IUpdate, State, StateType, Target, UpdateType } from '../common/update.js';
+import { AbstractUpdateService, createUpdateURL, getUpdateRequestHeaders, IUpdateURLOptions } from './abstractUpdateService.js';
+import { AbstractUpdateService, createUpdateURL, IUpdateURLOptions } from './abstractUpdateService.js';
import { INodeProcess } from '../../../base/common/platform.js';
+import * as semver from 'semver';
@@ -49,5 +49,9 @@ function getUpdateType(): UpdateType {
@@ -49,5 +48,9 @@ function getUpdateType(): UpdateType {
if (typeof _updateType === 'undefined') {
- _updateType = existsSync(path.join(path.dirname(process.execPath), 'unins000.exe'))
- ? UpdateType.Setup
@@ -231,12 +294,12 @@ index d02d7c3..4e8c541 100644
+ _updateType = UpdateType.Archive;
+ }
}
@@ -164,3 +168,3 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
@@ -164,3 +167,3 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
} else {
- const fastUpdatesEnabled = this.configurationService.getValue('update.enableWindowsBackgroundUpdates');
+ const fastUpdatesEnabled = getUpdateType() === UpdateType.Setup && this.configurationService.getValue('update.enableWindowsBackgroundUpdates');
// GC for background updates in system setup happens via inno_setup since it requires
@@ -182,12 +186,22 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
@@ -182,12 +185,22 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
- protected buildUpdateFeedUrl(quality: string, commit: string, options?: IUpdateURLOptions): string | undefined {
- let platform = `win32-${process.arch}`;
@@ -245,7 +308,7 @@ index d02d7c3..4e8c541 100644
- platform += '-archive';
- } else if (this.productService.target === 'user') {
- platform += '-user';
+ protected buildUpdateFeedUrl(quality: string, _commit: string, _options?: IUpdateURLOptions): string | undefined {
+ protected buildUpdateFeedUrl(quality: string, _commit: string, _options?: IUpdateURLOptions): string {
+ let target: Target;
+
+ switch (getUpdateType()) {
@@ -267,32 +330,60 @@ index d02d7c3..4e8c541 100644
- return createUpdateURL(this.productService.updateUrl!, platform, quality, commit, options);
+ return createUpdateURL(this.productService, quality, process.platform, process.arch, target);
}
@@ -209,3 +223,3 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
const headers = getUpdateRequestHeaders(this.productService.version);
- this.requestService.request({ url, headers, callSite: 'updateService.win32.checkForUpdates' }, CancellationToken.None)
+ this.requestService.request({ url, headers, callSite: NO_FETCH_TELEMETRY }, CancellationToken.None)
.then<IUpdate | null>(asJson)
@@ -226,2 +240,10 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
@@ -199,6 +212,2 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
+ const fetchedVersion = /\d+\.\d+\.\d+\.\d+/.test(update.productVersion) ? update.productVersion.replace(/(\d+\.\d+\.\d+)\.\d+(\-\w+)?/, '$1$2') : update.productVersion.replace(/(\d+\.\d+\.)0+(\d+)(\-\w+)?/, '$1$2$3')
+ const currentVersion = this.productService.version.replace(/(\d+\.\d+\.)0+(\d+)(\-\w+)?/, '$1$2$3')
- const internalOrg = this.getInternalOrg();
- const background = !explicit && !internalOrg;
- const url = this.buildUpdateFeedUrl(this.quality, pendingCommit ?? this.productService.commit!, { background, internalOrg });
-
// Only set CheckingForUpdates if we're not already in Overwriting state
@@ -208,9 +217,13 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
- const headers = getUpdateRequestHeaders(this.productService.version);
- this.requestService.request({ url, headers, callSite: 'updateService.win32.checkForUpdates' }, CancellationToken.None)
- .then<IUpdate | null>(asJson)
- .then(update => {
+ const internalOrg = this.getInternalOrg();
+ const background = !explicit && !internalOrg;
+ const url = this.buildUpdateFeedUrl(this.quality, pendingCommit ?? this.productService.commit!, { background, internalOrg });
+
+ if(semver.compareBuild(currentVersion, fetchedVersion) >= 0) {
+ this.logService.info('update#doCheckForUpdates', { url, explicit, background });
+
+ this._isLatestVersion(url, explicit)
+ .then((result) => {
const updateType = getUpdateType();
- if (!update || !update.url || !update.version || !update.productVersion) {
+ if(!result) {
// If we were checking for an overwrite update and found nothing newer,
@@ -226,2 +239,9 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
+ const { lastest, update } = result;
+
+ if(lastest) {
+ this.setState(State.Idle(updateType, undefined, explicit || undefined));
+ return Promise.resolve(null);
+ }
+
if (updateType === UpdateType.Archive) {
@@ -258,3 +280,3 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
@@ -258,3 +278,3 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
- return this.requestService.request({ url: update.url, callSite: 'updateService.win32.downloadUpdate' }, CancellationToken.None)
+ return this.requestService.request({ url: update.url, callSite: NO_FETCH_TELEMETRY }, CancellationToken.None)
.then(context => {
@@ -304,3 +326,2 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
.then(undefined, err => {
@@ -303,8 +323,7 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
})
- .then(undefined, err => {
- this.telemetryService.publicLog2<{ messageHash: string }, UpdateErrorClassification>('update:error', { messageHash: String(hash(String(err))) });
this.logService.error(err);
@@ -368,20 +389,31 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
- this.logService.error(err);
+ .then(undefined, (error) => {
+ this.logService.error(error);
// only show message when explicitly checking for updates
- const message: string | undefined = explicit ? (err.message || err) : undefined;
+ const message: string | undefined = explicit ? (error.message || error) : undefined;
@@ -368,20 +387,31 @@ export class Win32UpdateService extends AbstractUpdateService implements IRelaun
await pfs.Promises.writeFile(this.availableUpdate.updateFilePath, 'flag');
- const child = spawn(this.availableUpdate.packagePath,
- [