mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2025-01-08 13:41:59 -05:00
ci: Set signing var based on branch name [skip ci]
This commit is contained in:
parent
5699bdaaae
commit
b9aed4ef5c
1 changed files with 7 additions and 8 deletions
15
.github/workflows/ci-cd.yml
vendored
15
.github/workflows/ci-cd.yml
vendored
|
@ -1,8 +1,6 @@
|
||||||
name: CI/CD
|
name: CI/CD
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
|
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
|
||||||
|
@ -27,9 +25,10 @@ jobs:
|
||||||
environment:
|
environment:
|
||||||
name: ${{ matrix.os }}
|
name: ${{ matrix.os }}
|
||||||
env:
|
env:
|
||||||
|
SCRATCH_SHOULD_SIGN: ${{ github.ref_name == 'main' }}
|
||||||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
||||||
AC_USERNAME: ${{ secrets.AC_USERNAME }}
|
AC_USERNAME: ${{ github.ref_name == 'main' && secrets.AC_USERNAME }}
|
||||||
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
|
AC_PASSWORD: ${{ github.ref_name == 'main' && secrets.AC_PASSWORD }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
|
@ -60,7 +59,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
ssh-private-key: ${{ secrets.FASTLANE_DEPLOY_KEY }}
|
ssh-private-key: ${{ secrets.FASTLANE_DEPLOY_KEY }}
|
||||||
- name: Fastlane
|
- name: Fastlane
|
||||||
if: matrix.os == 'macos-latest' && vars.SCRATCH_SHOULD_SIGN
|
if: matrix.os == 'macos-latest' && env.SCRATCH_SHOULD_SIGN == true
|
||||||
run: fastlane circleci
|
run: fastlane circleci
|
||||||
- name: Build
|
- name: Build
|
||||||
timeout-minutes: 30 # macOS notarization can take a while
|
timeout-minutes: 30 # macOS notarization can take a while
|
||||||
|
@ -71,10 +70,10 @@ jobs:
|
||||||
# macOS CSC info was set by Fastlane above
|
# macOS CSC info was set by Fastlane above
|
||||||
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
|
WIN_CSC_LINK: ${{ secrets.WIN_CSC_LINK }}
|
||||||
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
|
WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }}
|
||||||
PYTHON_PATH: /Users/runner/.pyenv/versions/2.7.18/bin/python
|
PYTHON_PATH: ${{ matrix.os == 'macos-latest' && '/Users/runner/.pyenv/versions/2.7.18/bin/python'}}
|
||||||
run: npm run ${{ vars.SCRATCH_SHOULD_SIGN && 'dist' || 'distDev' }}
|
run: npm run ${{ env.SCRATCH_SHOULD_SIGN == true && 'dist' || 'distDev' }}
|
||||||
- name: Zip MAS-Dev build
|
- name: Zip MAS-Dev build
|
||||||
if: matrix.os == 'macos-latest'
|
if: matrix.os == 'macos-latest' && env.SCRATCH_SHOULD_SIGN == true
|
||||||
run: |
|
run: |
|
||||||
NPM_APP_VERSION="`node -pe "require('./package.json').version"`"
|
NPM_APP_VERSION="`node -pe "require('./package.json').version"`"
|
||||||
cd dist/mas-dev
|
cd dist/mas-dev
|
||||||
|
|
Loading…
Reference in a new issue