Packaging #87
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: Packaging | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- package | |
tags: | |
- '*' | |
env: | |
FORCE_COLOR: 1 | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-14 | |
- ubuntu-22.04 | |
- windows-2022 | |
host: | |
- x64 | |
target: | |
- x64 | |
node: | |
- 18 | |
include: | |
- os: macos-14 | |
node: 18 | |
host: arm64 | |
target: arm64 | |
- os: windows-2022 | |
node: 18 | |
host: x64 | |
target: x86 | |
name: ${{ matrix.os }} (node=${{ matrix.node }}, host=${{ matrix.host }}, target=${{ matrix.target }}) | |
steps: | |
- name: association | |
if: startsWith(matrix.os, 'windows') | |
run: | | |
ls | |
ls "c:\\" | |
ls "c:\\Program Files" | |
ls "c:\\Program Files/Git" | |
ls "c:\\Program Files/Git/bin" | |
cmd /c assoc .sh=bashscript | |
cmd /c ftype bashscript="%ProgramFiles%\Git\bin\bash.exe" "%1" | |
cmd /c ftype | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Submodule cleanup fix # See https://github.com/actions/checkout/issues/358 | |
run: | | |
git submodule foreach --recursive git clean -ffdx | |
git submodule foreach --recursive git reset --hard | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
architecture: ${{ matrix.target }} | |
- name: Install dependencies | |
run: yarn install --network-timeout 300000 | |
- name: Hooks and crooks | |
run: yarn run setup | |
env: | |
RUN_OS: ${{ matrix.os }} | |
RUN_ARCH: ${{ matrix.target }} | |
- name: Build | |
run: yarn run build | |
- name: Test | |
run: yarn run test | |
- name: Package | |
# github endpoints hang up quite a bit, add one retry. | |
run: yarn run electron:ci || yarn run electron:ci | |
env: | |
TARGET_ARCH: ${{ matrix.target }} | |
GITHUB_TOKEN: ${{ github.token }} | |
DEBUG: electron-builder | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} | |
CSC_LINK: ${{ secrets.CSC_LINK }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.os }}-${{ matrix.host }}-${{ matrix.target }} | |
path: dist/grist-electron-* | |
if-no-files-found: "error" |