2021-01-12 23:01:29 +03:00
|
|
|
name: windows_build
|
|
|
|
|
|
|
|
on:
|
2021-03-29 00:07:35 +03:00
|
|
|
workflow_dispatch:
|
2021-01-12 23:01:29 +03:00
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * *'
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
windows:
|
|
|
|
runs-on: windows-2016
|
|
|
|
env:
|
|
|
|
VSCODE_ARCH: ${{ matrix.vscode_arch }}
|
2021-01-13 00:56:52 +03:00
|
|
|
OS_NAME: 'windows'
|
2021-01-12 23:01:29 +03:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
vscode_arch: [x64, ia32, arm64]
|
|
|
|
|
|
|
|
steps:
|
2021-09-09 02:38:07 +03:00
|
|
|
- name: Checkout github repo (+ download lfs dependencies)
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
lfs: true
|
|
|
|
|
|
|
|
- name: Checkout LFS objects
|
|
|
|
run: git lfs checkout
|
2021-01-12 23:01:29 +03:00
|
|
|
|
|
|
|
- name: Setup Node.js environment
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
2021-07-10 17:09:37 +03:00
|
|
|
node-version: 14
|
2021-01-12 23:01:29 +03:00
|
|
|
|
|
|
|
- name: Install Yarn
|
|
|
|
run: npm install -g yarn
|
|
|
|
|
|
|
|
- name: Setup Python 2
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '2.x'
|
|
|
|
|
2021-03-10 18:48:45 +03:00
|
|
|
- name: Check PR or cron
|
2021-03-10 18:56:14 +03:00
|
|
|
run: ./check_cron_or_pr.sh
|
|
|
|
shell: bash
|
2021-03-10 18:48:45 +03:00
|
|
|
|
2021-01-12 23:01:29 +03:00
|
|
|
- name: Clone VSCode repo
|
|
|
|
run: ./get_repo.sh
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Check existing VSCodium tags/releases
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: ./check_tags.sh
|
|
|
|
shell: bash
|
2021-03-10 18:48:45 +03:00
|
|
|
if: env.SHOULD_DEPLOY == 'yes'
|
2021-01-12 23:01:29 +03:00
|
|
|
|
2021-03-10 20:58:36 +03:00
|
|
|
- name: Compute cache key
|
|
|
|
id: yarnCacheKey
|
|
|
|
run: echo "::set-output name=value::$(node build/azure-pipelines/computeYarnCacheKey.js)"
|
2021-03-10 21:24:52 +03:00
|
|
|
if: env.SHOULD_BUILD == 'yes'
|
2021-03-10 20:58:36 +03:00
|
|
|
|
|
|
|
- name: Get yarn cache directory path
|
|
|
|
id: yarnCacheDirPath
|
|
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
2021-03-10 21:24:52 +03:00
|
|
|
if: env.SHOULD_BUILD == 'yes'
|
2021-03-10 20:58:36 +03:00
|
|
|
|
|
|
|
- name: Cache yarn directory
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
2021-03-10 21:38:28 +03:00
|
|
|
key: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-${{ steps.yarnCacheKey.outputs.value }}
|
|
|
|
restore-keys: ${{ env.OS_NAME }}-${{ env.VSCODE_ARCH }}-yarnCacheDir-
|
2021-03-10 20:58:36 +03:00
|
|
|
if: env.SHOULD_BUILD == 'yes'
|
|
|
|
|
2021-01-12 23:01:29 +03:00
|
|
|
- name: Build
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
npm_config_arch: ${{ matrix.vscode_arch }}
|
|
|
|
npm_config_target_arch: ${{ matrix.vscode_arch }}
|
|
|
|
run: ./build.sh
|
2021-01-12 23:04:28 +03:00
|
|
|
shell: bash
|
2021-01-12 23:01:29 +03:00
|
|
|
if: env.SHOULD_BUILD == 'yes'
|
|
|
|
|
|
|
|
- name: Move/rename build artifacts
|
|
|
|
run: |
|
2021-08-27 17:01:17 +03:00
|
|
|
mv vscode\\.build\\win32-${VSCODE_ARCH}\\system-setup\\VSCodeSetup.exe VSCodiumSetup-${VSCODE_ARCH}-${MS_TAG}.exe
|
|
|
|
mv vscode\\.build\\win32-${VSCODE_ARCH}\\user-setup\\VSCodeSetup.exe VSCodiumUserSetup-${VSCODE_ARCH}-${MS_TAG}.exe
|
|
|
|
mv vscode\\.build\\win32-${VSCODE_ARCH}\\archive\\VSCode-win32-${VSCODE_ARCH}.zip VSCodium-win32-${VSCODE_ARCH}-${MS_TAG}.zip
|
2021-09-09 02:38:07 +03:00
|
|
|
|
|
|
|
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
|
|
|
|
mv build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-${MS_TAG}.msi .
|
|
|
|
mv build\\windows\\msi\\releasedir\\VSCodium-${VSCODE_ARCH}-updates-disabled-${MS_TAG}.msi .
|
|
|
|
fi
|
2021-01-12 23:01:29 +03:00
|
|
|
shell: bash
|
2021-03-10 18:48:45 +03:00
|
|
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
2021-01-12 23:01:29 +03:00
|
|
|
|
|
|
|
- name: Generate shasums
|
|
|
|
run: ./sum.sh
|
|
|
|
shell: bash
|
2021-03-10 18:48:45 +03:00
|
|
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
2021-01-12 23:01:29 +03:00
|
|
|
|
|
|
|
- name: Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
2021-03-10 18:48:45 +03:00
|
|
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
2021-01-12 23:01:29 +03:00
|
|
|
with:
|
2021-08-27 17:01:17 +03:00
|
|
|
tag_name: ${{ env.MS_TAG }}
|
2021-01-12 23:01:29 +03:00
|
|
|
files: |
|
|
|
|
./*.sha256
|
|
|
|
./VSCodium*.zip
|
|
|
|
./VSCodiumUserSetup*.exe
|
|
|
|
./VSCodiumSetup*.exe
|
2021-09-09 02:38:07 +03:00
|
|
|
./VSCodium*.msi
|
2021-01-12 23:01:29 +03:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Update versions repo
|
2021-03-10 18:48:45 +03:00
|
|
|
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
2021-01-12 23:01:29 +03:00
|
|
|
run: ./update_version.sh
|
|
|
|
shell: bash
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.STRONGER_GITHUB_TOKEN }}
|
|
|
|
GITHUB_USERNAME: ${{ github.repository_owner }}
|
|
|
|
|