Skip to content

Commit

Permalink
Update Opus build for both macOS architectures too.
Browse files Browse the repository at this point in the history
  • Loading branch information
brunchboy committed May 5, 2024
1 parent bee0c5a commit d6af634
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/build_opus_dmg.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ mv "$dmg_name" "$artifact_name"

# Upload the disk image as a release artifact
if [ "$release_snapshot" = true ] ; then
gh release upload latest-opus-preview "$artifact_name#macOS disk image"
gh release upload latest-opus-preview "$artifact_name#$artifact_description"
else
echo "Should not get here: the opus branch should only build snapshots!"
exit 1
Expand Down
52 changes: 51 additions & 1 deletion .github/workflows/opus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
run: .\.github\scripts\build_opus_msi.ps1

build_dmg:
name: Build macOS Disk Image
name: Build macOS Apple Silicon Disk Image
runs-on: macos-latest

needs:
Expand All @@ -162,6 +162,55 @@ jobs:
echo "dmg_name=$dmgName" >>$GITHUB_ENV
artifactName="Beat-Link-Trigger-$git_version-MacOS.dmg"
echo "artifact_name=$artifactName" >>$GITHUB_ENV
artifactDescription="macOS (Apple Silicon) disk image"
echo "artifact_description=$artifactDescription" >>$GITHUB_ENV
if [[ $release_tag =~ .*-SNAPSHOT ]]
then
echo "release_snapshot=true" >>$GITHUB_ENV
else
echo "release_snapshot=false" >>$GITHUB_ENV
fi
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'

- name: Build 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_opus_dmg.zsh

build_intel_dmg:
name: Build macOS Intel Disk Image
runs-on: macos-13

needs:
build_uberjar

steps:
- uses: actions/checkout@v4

- uses: Deep-Symmetry/github-version-action@v1
with:
tag-var-name: release_tag

- name: Determine überjar name, build version, disk image name, artifact name, and snapshot status
run: |
uberjarName="beat-link-trigger-$git_version.jar"
echo "uberjar_name=$uberjarName" >>$GITHUB_ENV
buildVersion=${release_tag%-SNAPSHOT}
buildVersion=${buildVersion#v}
echo "build_version=$buildVersion" >>$GITHUB_ENV
dmgName="Beat Link Trigger-$buildVersion.dmg"
echo "dmg_name=$dmgName" >>$GITHUB_ENV
artifactName="Beat-Link-Trigger-$git_version-MacOS-Intel.dmg"
echo "artifact_name=$artifactName" >>$GITHUB_ENV
artifactDescription="macOS (Intel) disk image"
echo "artifact_description=$artifactDescription" >>$GITHUB_ENV
if [[ $release_tag =~ .*-SNAPSHOT ]]
then
echo "release_snapshot=true" >>$GITHUB_ENV
Expand All @@ -188,6 +237,7 @@ jobs:
needs:
- build_dmg
- build_msi
- build_intel_dmg

steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit d6af634

Please sign in to comment.