Skip to content

stable-linux

stable-linux #13

Workflow file for this run

name: stable-linux
on:
workflow_dispatch:
inputs:
new_release:
type: boolean
description: Force new Release
force_version:
type: boolean
description: Force update version
vscodium_latest:
type: boolean
description: Use latest VSCodium
push:
tags:
- "*"
env:
APP_NAME: MrCode
ASSETS_REPOSITORY: ${{ github.repository }}
OS_NAME: linux
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/MrCode-versions
VSCODE_QUALITY: stable
jobs:
check:
runs-on: ubuntu-latest
container:
image: vscodium/vscodium-linux-build-agent:bionic-x64
outputs:
MS_TAG: ${{ env.MS_TAG }}
MS_COMMIT: ${{ env.MS_COMMIT }}
VSCODIUM_COMMIT: ${{ env.VSCODIUM_COMMIT }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Clone VSCodium repo
env:
VSCODIUM_LATEST: ${{ github.event.inputs.vscodium_latest }}
run: ./get_repo.sh
- name: Clone VSCode repo
working-directory: ./vscodium
run: ./get_repo.sh
dependencies:
needs:
- check
runs-on: ubuntu-latest
env:
MS_TAG: ${{ needs.check.outputs.MS_TAG }}
MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }}
VSCODIUM_COMMIT: ${{ needs.check.outputs.VSCODIUM_COMMIT }}
RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }}
strategy:
fail-fast: false
matrix:
include:
- vscode_arch: x64
image: vscodium/vscodium-linux-build-agent:centos7-devtoolset8-x64
# - vscode_arch: arm64
# image: vscodium/vscodium-linux-build-agent:bionic-x64
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.GITHUB_BRANCH }}
- name: Clone VSCodium repo
run: ./get_repo.sh
- name: Clone VSCode repo
working-directory: ./vscodium
run: ./get_repo.sh
- uses: docker/setup-qemu-action@v2
if: matrix.vscode_arch == 'arm64'
- name: Install remote dependencies (x64)
env:
npm_config_arch: x64
working-directory: ./vscodium
run: ./install_remote_dependencies.sh
if: matrix.vscode_arch == 'x64'
# - name: Install remote dependencies (arm64)
# run: |
# set -e
# docker run -e VSCODE_QUALITY -e GITHUB_TOKEN -v $(pwd):/root/vscodium vscodium/vscodium-linux-build-agent:centos7-devtoolset8-arm64 /root/vscodium/install_remote_dependencies.sh
# if: matrix.vscode_arch == 'arm64'
- name: Save remote dependencies
uses: actions/upload-artifact@v3
with:
name: remote-dependencies-${{ matrix.vscode_arch }}
path: ./vscodium/remote-dependencies.tar
retention-days: 30
build:
needs:
- check
- dependencies
runs-on: ubuntu-latest
env:
DISABLE_UPDATE: 'yes'
MS_TAG: ${{ needs.check.outputs.MS_TAG }}
MS_COMMIT: ${{ needs.check.outputs.MS_COMMIT }}
VSCODIUM_COMMIT: ${{ needs.check.outputs.VSCODIUM_COMMIT }}
RELEASE_VERSION: ${{ needs.check.outputs.RELEASE_VERSION }}
strategy:
fail-fast: false
matrix:
include:
- vscode_arch: x64
npm_arch: x64
image: vscodium/vscodium-linux-build-agent:bionic-x64
- vscode_arch: arm64
npm_arch: arm64
image: vscodium/vscodium-linux-build-agent:buster-arm64
- vscode_arch: armhf
npm_arch: arm
image: vscodium/vscodium-linux-build-agent:buster-armhf
- vscode_arch: ppc64le
npm_arch: ppcc64le
image: vscodium/vscodium-linux-build-agent:bionic-ppc64le
container:
image: ${{ matrix.image }}
env:
VSCODE_ARCH: ${{ matrix.vscode_arch }}
outputs:
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
SHOULD_BUILD: ${{ env.SHOULD_BUILD }}
steps:
- uses: actions/checkout@v3
- name: Clone VSCodium repo
run: ./get_repo.sh
- name: Prepare VSCodium
run: ./prepare.sh
- name: Install GH
run: ./install_gh.sh
- name: Check existing VSCodium tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_RELEASE: ${{ github.event.inputs.new_release }}
working-directory: ./vscodium
run: ./check_tags.sh
- name: Restore remote dependencies
uses: actions/download-artifact@v3
with:
name: remote-dependencies-${{ matrix.vscode_arch }}
path: ./vscodium
if: env.SHOULD_BUILD == 'yes' && matrix.vscode_arch == 'x64'
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_arch }}
working-directory: ./vscodium
run: ./build.sh
if: env.SHOULD_BUILD == 'yes'
- name: Prepare assets
working-directory: ./vscodium
run: ./prepare_assets.sh
if: env.SHOULD_BUILD == 'yes'
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ./vscodium
run: ./release.sh
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 }}
working-directory: ./vscodium
run: ./update_version.sh
aur:
needs:
- build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- package_name: mrcode-bin
package_type: stable
- package_name: mrcode
package_type: stable
- package_name: mrcode-git
package_type: rolling
steps:
- name: Publish ${{ matrix.package_name }}
uses: zokugun/github-actions-aur-releaser@v1
with:
package_name: ${{ matrix.package_name }}
package_type: ${{ matrix.package_type }}
aur_private_key: ${{ secrets.AUR_PRIVATE_KEY }}
aur_username: ${{ secrets.AUR_USERNAME }}
aur_email: ${{ secrets.AUR_EMAIL }}