Skip to content

stable-macos

stable-macos #25

Workflow file for this run

name: stable-macos
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: osx
VERSIONS_REPOSITORY: ${{ github.repository_owner }}/MrCode-versions
VSCODE_QUALITY: stable
jobs:
build:
runs-on: ${{ matrix.runner }}
env:
VSCODE_ARCH: ${{ matrix.vscode_arch }}
strategy:
fail-fast: false
matrix:
include:
- runner: macos-12
vscode_arch: x64
- runner: [self-hosted, macOS, ARM64]
vscode_arch: arm64
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install Yarn
run: npm install -g yarn
- name: Clone VSCodium repo
env:
VSCODIUM_LATEST: ${{ github.event.inputs.vscodium_latest }}
run: . get_repo.sh
- name: Prepare VSCodium
run: . prepare.sh
- name: Check existing MrCode tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NEW_RELEASE: ${{ github.event.inputs.new_release }}
working-directory: ./vscodium
run: . check_tags.sh
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
working-directory: ./vscodium
run: ./build.sh
if: env.SHOULD_BUILD == 'yes'
- name: Prepare assets
env:
CERTIFICATE_OSX_P12: ${{ secrets.MACOS_P12_BASE64 }}
CERTIFICATE_OSX_PASSWORD: ${{ secrets.MACOS_P12_PASSWORD }}
CERTIFICATE_OSX_ID: ${{ secrets.MACOS_IDENTITY }}
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
if: env.SHOULD_BUILD == 'yes' || github.event.inputs.force_version
- name: Clean up keychain
if: always()
run: |
KEYCHAIN=$RUNNER_TEMP/build.keychain
if [ -f "$KEYCHAIN" ];
then
security delete-keychain $KEYCHAIN
fi