.github/actions/build-and-publish/action.yaml
name: Build and Publish
author: Erwan Guyader
description: Builds Cozy Desktop binaries and publish them to the latest Github release draft.
inputs:
gh-token:
description: 'The Github token used to attach binaries to releases.'
required: true
mac-cert:
description: 'The code signing certificate encoded in base64.'
required: false
mac-cert-password:
description: 'The code signing certificate password.'
required: false
apple-id:
description: 'The Apple notarization account id.'
required: false
apple-id-password:
description: 'The Apple notarization account password.'
required: false
apple-team-id:
description: 'Id of the team the Apple notarization account if part of.'
required: false
runs:
using: composite
steps:
- shell: bash
env:
GH_TOKEN: "${{ inputs.gh-token }}"
CSC_FOR_PULL_REQUEST: true
CSC_LINK: "${{ inputs.mac-cert }}"
CSC_KEY_PASSWORD: "${{ inputs.mac-cert-password }}"
APPLE_ID: "${{ inputs.apple-id }}"
APPLE_ID_PASSWORD: "${{ inputs.apple-id-password }}"
APPLE_TEAM_ID: "${{ inputs.apple-team-id }}"
run: |
if [ "${{ runner.os }}" == "Linux" ]; then
# Install build dependencies:
# - `libopenjp2-tools` for the basic build
# - the others for cross-compiling 32 bit apps on a 64 bit machine
sudo apt update
sudo apt install --no-install-recommends -y libopenjp2-tools gcc-multilib g++-multilib
fi
yarn dist