vscodium/.github/workflows/macos.yml

73 lines
1.8 KiB
YAML

name: CI
on:
push:
pull_request:
branches: [ master ]
jobs:
build:
runs-on: macOS-latest
env:
TRAVIS_OS_NAME: "osx"
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v1.4.3
with:
node-version: 12.14.1
- name: Clone VSCode repo
run: |
. get_repo.sh
echo "::set-env name=LATEST_MS_TAG::$LATEST_MS_TAG"
echo "::set-env name=LATEST_MS_COMMIT::$LATEST_MS_COMMIT"
- name: Check existing VSCodium tags/releases
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
. check_tags.sh
echo "::set-env name=SHOULD_BUILD::$SHOULD_BUILD"
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./build.sh
- name: Sign binary
run: ./sign_mac_app.sh
env:
CERTIFICATE_OSX_P12: ${{ secrets.CERTIFICATE_OSX_P12 }}
CERTIFICATE_OSX_PASSWORD: ${{ secrets.CERTIFICATE_OSX_PASSWORD }}
CERTIFICATE_OSX_ID: ${{ secrets.CERTIFICATE_OSX_ID }}
- name: Zip release
run: ./create_zip.sh
- name: DMG the release
run: ./create_dmg.sh
- name: Generate shasums
run: ./sum.sh
- name: Release
uses: softprops/action-gh-release@v1
if: env.SHOULD_BUILD == 'yes'
with:
tag_name: ${{ env.LATEST_MS_TAG }}
files: |
./*.zip
./*.dmg
./*.sha256
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update versions repo
if: env.SHOULD_BUILD == 'yes'
run: ./update_version.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.repository_owner }}