Skip to content

Trying to troubleshoot Mac code signing #46

Trying to troubleshoot Mac code signing

Trying to troubleshoot Mac code signing #46

Workflow file for this run

name: Create executables
on:
push:
branches:
- main
env:
windows_zip_name: 'Carabiner_Win_x64.zip'
linux_gz_name: 'Carabiner_Linux_x64.gz'
mac_dmg_name: 'Carabiner_Mac.dmg'
mac_signing_name: "Deep Symmetry, LLC (9M6LKU948Y)"
mac_team_id: "9M6LKU948Y"
mac_notarization_user: "james@deepsymmetry.org"
initial_description: |
:construction: This is pre-release code for people who want to help test [what is going into the next release](https://github.com/Deep-Symmetry/carabiner/blob/master/CHANGELOG.md).
> Don’t download this if you aren’t comfortable testing code while it is under active development! Instead, look at the [latest release](https:///github.com/Deep-Symmetry/carabiner/releases/latest).
Please note that since it’s a snapshot release, the executables below (you may need to click to expand the Assets) will change frequently—whenever new code is pushed to the project—so you will want to _download the latest version every time you work with one_.
jobs:
build_windows:
name: Build Windows executable
runs-on: windows-2019
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v1
- uses: Deep-Symmetry/github-version-action@v1
with:
tag-var-name: release_tag
- name: Determine snapshot status
run: |
If ($env:release_tag -like '*-SNAPSHOT') {
echo "release_snapshot=true" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
} Else {
echo "release_snapshot=false" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
}
- name: Compile and zip executable
run: |
git submodule update --init --recursive
mkdir build
cd build
cmake -G "Visual Studio 16 2019" ..
cmake --build . --config Release
cd bin\Release
7z a $env:windows_zip_name Carabiner.exe
mv $env:windows_zip_name ..\..\..
- name: Upload Windows executable
if: success()
uses: Xotl/cool-github-releases@v1
with:
mode: update
tag_name: ${{ env.release_tag }}
isPrerelease: true
replace_assets: ${{ env.release_snapshot }}
assets: ${{ env.windows_zip_name }}
github_token: ${{ github.token }}
initial_mrkdwn: ${{ env.initial_description }}
build_mac:
name: Build macOS executable
runs-on: macos-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v1
- uses: Deep-Symmetry/github-version-action@v1
with:
tag-var-name: release_tag
- name: Determine snapshot status
run: |
if [[ $release_tag =~ .*-SNAPSHOT ]]
then
echo "release_snapshot=true" >> $GITHUB_ENV
else
echo "release_snapshot=false" >> $GITHUB_ENV
fi
- name: Build, sign, and notarize macOS disk image
env:
IDENTITY_PASSPHRASE: ${{ secrets.IDENTITY_PASSPHRASE }}
IDENTITY_P12_B64: ${{ secrets.IDENTITY_P12_B64 }}
NOTARIZATION_PW: ${{ secrets.NOTARIZATION_PW }}
run: zsh .github/scripts/build_dmg.zsh
- name: Upload macOS disk image
if: success()
uses: Xotl/cool-github-releases@v1
with:
mode: update
tag_name: ${{ env.release_tag }}
isPrerelease: true
replace_assets: ${{ env.release_snapshot }}
assets: ${{ env.mac_dmg_name }}
github_token: ${{ github.token }}
initial_mrkdwn: ${{ env.initial_description }}
build_linux:
name: Build Linux x64 executable
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v1
- uses: Deep-Symmetry/github-version-action@v1
with:
tag-var-name: release_tag
- name: Determine snapshot status
run: |
if [[ $release_tag =~ .*-SNAPSHOT ]]
then
echo "release_snapshot=true" >> $GITHUB_ENV
else
echo "release_snapshot=false" >> $GITHUB_ENV
fi
- name: Compile and gzip executable
run: |
git submodule update --init --recursive
mkdir build
cd build
cmake ..
cmake --build .
cd bin
gzip Carabiner
mv Carabiner.gz ../../$linux_gz_name
- name: Upload Linux executable
if: success()
uses: Xotl/cool-github-releases@v1
with:
mode: update
tag_name: ${{ env.release_tag }}
isPrerelease: ${{ env.release_snapshot }}
replace_assets: ${{ env.release_snapshot }}
assets: ${{ env.linux_gz_name }}
github_token: ${{ github.token }}
initial_mrkdwn: ${{ env.initial_description }}