disable release channel selection if no sub found #1670
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- "**" | |
paths-ignore: | |
- "**.md" | |
jobs: | |
skip_duplicates: | |
name: Skip Duplicate Runs | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@master | |
with: | |
concurrent_skipping: "same_content" | |
do_not_skip: '["push", "workflow_dispatch", "schedule"]' | |
build: | |
needs: skip_duplicates | |
if: ${{ needs.skip_duplicates.outputs.should_skip != 'true' }} | |
name: Test on node ${{ matrix.node-version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node-version: [16.x] | |
os: [ubuntu-latest, windows-latest, macOS-latest] | |
steps: | |
- name: Check out Git repository | |
uses: actions/checkout@v2 | |
- name: Install Node.js and yarn | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: yarn | |
- name: Cache node modules | |
uses: actions/cache@v1 | |
id: cache | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-build-${{ secrets.CACHE_CONTROL }}-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.OS }}-build-${{ secrets.CACHE_CONTROL }}-${{ env.cache-name }}- | |
${{ runner.OS }}-build-${{ secrets.CACHE_CONTROL }} | |
- name: Install dependencies | |
run: | | |
yarn install | |
- name: Load Windows signing certificate and secret | |
if: matrix.os == 'windows-latest' && env.CERTIFICATE_WINDOWS_PASSWORD != null | |
shell: bash | |
run: | | |
echo "CSC_LINK=${{ secrets.CERTIFICATE_WINDOWS_APPLICATION }}" >> $GITHUB_ENV | |
echo "CSC_KEY_PASSWORD=${{ secrets.CERTIFICATE_WINDOWS_PASSWORD }}" >> $GITHUB_ENV | |
env: | |
CERTIFICATE_WINDOWS_APPLICATION: ${{ secrets.CERTIFICATE_WINDOWS_APPLICATION }} | |
CERTIFICATE_WINDOWS_PASSWORD: ${{ secrets.CERTIFICATE_WINDOWS_PASSWORD }} | |
- name: Load macOS signing certificates and secrets | |
if: matrix.os == 'macOS-latest' && env.CERTIFICATE_MACOS_PASSWORD != null | |
run: | | |
chmod +x build/load-macos-certs-ci.sh && ./build/load-macos-certs-ci.sh | |
mkdir -p ~/private_keys/ | |
echo '${{ secrets.APPLE_CONNECT_API_KEY }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8 | |
echo "CSC_LINK=${{ secrets.CERTIFICATE_MACOS_APPLICATION }}" >> $GITHUB_ENV | |
echo "CSC_KEY_PASSWORD=${{ secrets.CERTIFICATE_MACOS_PASSWORD }}" >> $GITHUB_ENV | |
echo "APPLE_API_KEY=${{ secrets.APPLE_API_KEY_ID }}" >> $GITHUB_ENV | |
echo "APPLE_ISSUER_ID=${{ secrets.APPLE_ISSUER_ID }}" >> $GITHUB_ENV | |
echo "APPLE_TEAM_PROVIDER_ID=${{ secrets.APPLE_TEAM_PROVIDER_ID }}" >> $GITHUB_ENV | |
env: | |
CERTIFICATE_MACOS_APPLICATION: ${{ secrets.CERTIFICATE_MACOS_APPLICATION }} | |
CERTIFICATE_MACOS_PASSWORD: ${{ secrets.CERTIFICATE_MACOS_PASSWORD }} | |
- name: Build App | |
shell: bash | |
working-directory: ${{ github.workspace }} | |
run: | | |
echo ${{ secrets.ENVFILE }} > .env | |
yarn run package | |
env: | |
CI: true | |
NODE_OPTIONS: "--max-old-space-size=8192" | |
USE_HARD_LINKS: false # because of https://github.com/electron-userland/electron-builder/issues/3179 | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run tests | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
yarn run typecheck | |
yarn run test | |
- name: Lint | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
yarn run lint | |
- name: Prepare artifacts | |
shell: bash | |
run: | | |
mkdir artifacts | |
mv release/build/{*.exe*,*.deb,*.AppImage,*.dmg*,*.zip,*.yml} artifacts || true | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v1 | |
with: | |
name: ${{matrix.os}} | |
path: artifacts |