mirror of
https://github.com/VSCodium/vscodium.git
synced 2024-09-11 06:45:28 +03:00
refactor: move artifacts building and signing into prepare_artifacts.sh [skip ci] (#1221)
This commit is contained in:
parent
430d4e3888
commit
697bd5ef83
1
.github/workflows/insider-linux.yml
vendored
1
.github/workflows/insider-linux.yml
vendored
@ -2,7 +2,6 @@ name: insider-linux
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [ insider ]
|
||||
schedule:
|
||||
- cron: '0 1 * * *'
|
||||
push:
|
||||
|
19
.github/workflows/insider-macos.yml
vendored
19
.github/workflows/insider-macos.yml
vendored
@ -2,7 +2,6 @@ name: insider-macos
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [ insider ]
|
||||
schedule:
|
||||
- cron: '0 1 * * *'
|
||||
push:
|
||||
@ -75,27 +74,11 @@ jobs:
|
||||
run: ./build.sh
|
||||
if: env.SHOULD_BUILD == 'yes'
|
||||
|
||||
- name: Sign binary
|
||||
- name: Prepare artifacts
|
||||
env:
|
||||
CERTIFICATE_OSX_P12: ${{ secrets.CERTIFICATE_OSX_P12 }}
|
||||
CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
|
||||
CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }}
|
||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||
run: |
|
||||
if [ -d "VSCode-darwin-${VSCODE_ARCH}" ]; then # just in case the build failed
|
||||
cd "VSCode-darwin-${VSCODE_ARCH}"
|
||||
export CERTIFICATE_P12=VSCodium.p12
|
||||
echo $CERTIFICATE_OSX_P12 | base64 --decode > $CERTIFICATE_P12
|
||||
export KEYCHAIN=$RUNNER_TEMP/build.keychain
|
||||
security create-keychain -p mysecretpassword $KEYCHAIN
|
||||
security default-keychain -s $KEYCHAIN
|
||||
security unlock-keychain -p mysecretpassword $KEYCHAIN
|
||||
security import $CERTIFICATE_P12 -k $KEYCHAIN -P $CERTIFICATE_OSX_PASSWORD -T /usr/bin/codesign
|
||||
security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword $KEYCHAIN
|
||||
codesign --deep --force --verbose --sign "$CERTIFICATE_OSX_ID" VSCodium.app
|
||||
fi
|
||||
|
||||
- name: Prepare artifacts
|
||||
run: ./prepare_artifacts.sh
|
||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||
|
||||
|
1
.github/workflows/insider-spearhead.yml
vendored
1
.github/workflows/insider-spearhead.yml
vendored
@ -2,7 +2,6 @@ name: insider-spearhead
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [ insider ]
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
|
1
.github/workflows/insider-windows.yml
vendored
1
.github/workflows/insider-windows.yml
vendored
@ -2,7 +2,6 @@ name: insider-windows
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [ insider ]
|
||||
schedule:
|
||||
- cron: '0 1 * * *'
|
||||
push:
|
||||
|
1
.github/workflows/stable-linux.yml
vendored
1
.github/workflows/stable-linux.yml
vendored
@ -2,7 +2,6 @@ name: stable-linux
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [ master ]
|
||||
inputs:
|
||||
new_release:
|
||||
type: boolean
|
||||
|
19
.github/workflows/stable-macos.yml
vendored
19
.github/workflows/stable-macos.yml
vendored
@ -2,7 +2,6 @@ name: stable-macos
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [ master ]
|
||||
inputs:
|
||||
new_release:
|
||||
type: boolean
|
||||
@ -78,27 +77,11 @@ jobs:
|
||||
run: ./build.sh
|
||||
if: env.SHOULD_BUILD == 'yes'
|
||||
|
||||
- name: Sign binary
|
||||
- name: Prepare artifacts
|
||||
env:
|
||||
CERTIFICATE_OSX_P12: ${{ secrets.CERTIFICATE_OSX_P12 }}
|
||||
CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
|
||||
CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }}
|
||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||
run: |
|
||||
if [ -d "VSCode-darwin-${VSCODE_ARCH}" ]; then # just in case the build failed
|
||||
cd "VSCode-darwin-${VSCODE_ARCH}"
|
||||
export CERTIFICATE_P12=VSCodium.p12
|
||||
echo $CERTIFICATE_OSX_P12 | base64 --decode > $CERTIFICATE_P12
|
||||
export KEYCHAIN=$RUNNER_TEMP/build.keychain
|
||||
security create-keychain -p mysecretpassword $KEYCHAIN
|
||||
security default-keychain -s $KEYCHAIN
|
||||
security unlock-keychain -p mysecretpassword $KEYCHAIN
|
||||
security import $CERTIFICATE_P12 -k $KEYCHAIN -P $CERTIFICATE_OSX_PASSWORD -T /usr/bin/codesign
|
||||
security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword $KEYCHAIN
|
||||
codesign --deep --force --verbose --sign "$CERTIFICATE_OSX_ID" VSCodium.app
|
||||
fi
|
||||
|
||||
- name: Prepare artifacts
|
||||
run: ./prepare_artifacts.sh
|
||||
if: env.SHOULD_BUILD == 'yes' && env.SHOULD_DEPLOY == 'yes'
|
||||
|
||||
|
1
.github/workflows/stable-windows.yml
vendored
1
.github/workflows/stable-windows.yml
vendored
@ -2,7 +2,6 @@ name: stable-windows
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
branches: [ master ]
|
||||
inputs:
|
||||
new_release:
|
||||
type: boolean
|
||||
|
37
build.sh
37
build.sh
@ -30,29 +30,8 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
||||
. ../build/windows/rtf/make.sh
|
||||
|
||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-min-ci"
|
||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-inno-updater"
|
||||
|
||||
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
|
||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-archive"
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
|
||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-system-setup"
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_EXE_USR}" != "no" ]]; then
|
||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-user-setup"
|
||||
fi
|
||||
|
||||
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
|
||||
if [[ "${SHOULD_BUILD_MSI}" != "no" ]]; then
|
||||
. ../build/windows/msi/build.sh
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_MSI_NOUP}" != "no" ]]; then
|
||||
. ../build/windows/msi/build-updates-disabled.sh
|
||||
fi
|
||||
else
|
||||
if [[ "${VSCODE_ARCH}" != "ia32" && "${VSCODE_ARCH}" != "x64" ]]; then
|
||||
SHOULD_BUILD_REH="no"
|
||||
fi
|
||||
|
||||
@ -62,20 +41,6 @@ if [[ "${SHOULD_BUILD}" == "yes" ]]; then
|
||||
|
||||
find "../VSCode-linux-${VSCODE_ARCH}" -exec touch {} \;
|
||||
|
||||
if [[ "${SKIP_LINUX_PACKAGES}" != "True" ]]; then
|
||||
if [[ "${SHOULD_BUILD_DEB}" != "no" || "${SHOULD_BUILD_APPIMAGE}" != "no" ]]; then
|
||||
yarn gulp "vscode-linux-${VSCODE_ARCH}-build-deb"
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_RPM}" != "no" ]]; then
|
||||
yarn gulp "vscode-linux-${VSCODE_ARCH}-build-rpm"
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_APPIMAGE}" != "no" ]]; then
|
||||
. ../build/linux/appimage/build.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
VSCODE_PLATFORM="linux"
|
||||
fi
|
||||
|
||||
|
@ -4,10 +4,13 @@
|
||||
# to run with Bash: "C:\Program Files\Git\bin\bash.exe" ./build/build.sh
|
||||
###
|
||||
|
||||
export CI_BUILD=no
|
||||
export SHOULD_BUILD=yes
|
||||
export SKIP_PACKAGES="yes"
|
||||
export VSCODE_LATEST="no"
|
||||
export VSCODE_QUALITY="stable"
|
||||
|
||||
while getopts ":il" opt; do
|
||||
while getopts ":ilp" opt; do
|
||||
case "$opt" in
|
||||
i)
|
||||
export VSCODE_QUALITY="insider"
|
||||
@ -15,6 +18,9 @@ while getopts ":il" opt; do
|
||||
l)
|
||||
export VSCODE_LATEST="yes"
|
||||
;;
|
||||
p)
|
||||
export SKIP_PACKAGES="no"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
@ -39,16 +45,20 @@ else
|
||||
fi
|
||||
|
||||
echo "OS_NAME: ${OS_NAME}"
|
||||
echo "SKIP_PACKAGES: ${SKIP_PACKAGES}"
|
||||
echo "VSCODE_ARCH: ${VSCODE_ARCH}"
|
||||
echo "VSCODE_LATEST: ${VSCODE_LATEST}"
|
||||
echo "VSCODE_QUALITY: ${VSCODE_QUALITY}"
|
||||
|
||||
rm -rf vscode* VSCode*
|
||||
|
||||
if [[ "${OS_NAME}" == "windows" ]]; then
|
||||
rm -rf build/windows/msi/releasedir
|
||||
fi
|
||||
|
||||
. get_repo.sh
|
||||
. build.sh
|
||||
|
||||
SHOULD_BUILD=yes CI_BUILD=no . build.sh
|
||||
if [[ "${SKIP_PACKAGES}" == "no" ]]; then
|
||||
if [[ "${OS_NAME}" == "windows" ]]; then
|
||||
rm -rf build/windows/msi/releasedir
|
||||
fi
|
||||
|
||||
. prepare_artifacts.sh
|
||||
fi
|
||||
|
@ -15,6 +15,28 @@ sum_file() {
|
||||
mkdir artifacts
|
||||
|
||||
if [[ "${OS_NAME}" == "osx" ]]; then
|
||||
if [[ "${CI_BUILD}" != "no" ]]; then
|
||||
cd "VSCode-darwin-${VSCODE_ARCH}"
|
||||
|
||||
CERTIFICATE_P12=VSCodium.p12
|
||||
KEYCHAIN="${RUNNER_TEMP}/build.keychain"
|
||||
|
||||
echo "${CERTIFICATE_OSX_P12}" | base64 --decode > "${CERTIFICATE_P12}"
|
||||
security create-keychain -p mysecretpassword "${KEYCHAIN}"
|
||||
security default-keychain -s "${KEYCHAIN}"
|
||||
security unlock-keychain -p mysecretpassword "${KEYCHAIN}"
|
||||
security import "${CERTIFICATE_P12}" -k "${KEYCHAIN}" -P "${CERTIFICATE_OSX_PASSWORD}" -T /usr/bin/codesign
|
||||
security set-key-partition-list -S apple-tool:,apple: -s -k mysecretpassword "${KEYCHAIN}"
|
||||
|
||||
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
|
||||
codesign --deep --force --verbose --sign "${CERTIFICATE_OSX_ID}" "VSCodium - Insiders.app"
|
||||
else
|
||||
codesign --deep --force --verbose --sign "${CERTIFICATE_OSX_ID}" "VSCodium.app"
|
||||
fi
|
||||
|
||||
cd ..
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
|
||||
echo "Building and moving ZIP"
|
||||
cd "VSCode-darwin-${VSCODE_ARCH}"
|
||||
@ -32,6 +54,34 @@ if [[ "${OS_NAME}" == "osx" ]]; then
|
||||
|
||||
VSCODE_PLATFORM="darwin"
|
||||
elif [[ "${OS_NAME}" == "windows" ]]; then
|
||||
cd vscode || { echo "'vscode' dir not found"; exit 1; }
|
||||
|
||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-inno-updater"
|
||||
|
||||
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
|
||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-archive"
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_EXE_SYS}" != "no" ]]; then
|
||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-system-setup"
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_EXE_USR}" != "no" ]]; then
|
||||
yarn gulp "vscode-win32-${VSCODE_ARCH}-user-setup"
|
||||
fi
|
||||
|
||||
if [[ "${VSCODE_ARCH}" == "ia32" || "${VSCODE_ARCH}" == "x64" ]]; then
|
||||
if [[ "${SHOULD_BUILD_MSI}" != "no" ]]; then
|
||||
. ../build/windows/msi/build.sh
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_MSI_NOUP}" != "no" ]]; then
|
||||
. ../build/windows/msi/build-updates-disabled.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
cd ..
|
||||
|
||||
if [[ "${SHOULD_BUILD_ZIP}" != "no" ]]; then
|
||||
echo "Moving ZIP"
|
||||
mv "vscode\\.build\\win32-${VSCODE_ARCH}\\archive\\VSCode-win32-${VSCODE_ARCH}.zip" "artifacts\\VSCodium-win32-${VSCODE_ARCH}-${RELEASE_VERSION}.zip"
|
||||
@ -61,6 +111,22 @@ elif [[ "${OS_NAME}" == "windows" ]]; then
|
||||
|
||||
VSCODE_PLATFORM="win32"
|
||||
else
|
||||
cd vscode || { echo "'vscode' dir not found"; exit 1; }
|
||||
|
||||
if [[ "${SHOULD_BUILD_DEB}" != "no" || "${SHOULD_BUILD_APPIMAGE}" != "no" ]]; then
|
||||
yarn gulp "vscode-linux-${VSCODE_ARCH}-build-deb"
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_RPM}" != "no" ]]; then
|
||||
yarn gulp "vscode-linux-${VSCODE_ARCH}-build-rpm"
|
||||
fi
|
||||
|
||||
if [[ "${SHOULD_BUILD_APPIMAGE}" != "no" ]]; then
|
||||
. ../build/linux/appimage/build.sh
|
||||
fi
|
||||
|
||||
cd ..
|
||||
|
||||
if [[ "${SHOULD_BUILD_TAR}" != "no" ]]; then
|
||||
echo "Building and moving TAR"
|
||||
cd "VSCode-linux-${VSCODE_ARCH}"
|
||||
|
Loading…
Reference in New Issue
Block a user