Skip to content

Commit

Permalink
build both Intel and Silicon packages for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
dbarashev committed Jan 15, 2024
1 parent d911c52 commit e247547
Showing 1 changed file with 70 additions and 2 deletions.
72 changes: 70 additions & 2 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ jobs:
gsutil cp build\ganttproject-$env:VERSION.exe gs://dl.ganttproject.biz
gsutil acl ch -u AllUsers:R gs://dl.ganttproject.biz/ganttproject-$env:VERSION.exe
macOS:
macOS_silicon:
runs-on: macos-latest-xlarge
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:

- name: Create temporary DMG for notarization
run: |
jpackage --type dmg --app-image build/GanttProject.app -n "ganttproject-$VERSION" --dest build/
jpackage --type dmg --app-image build/GanttProject.app -n "ganttproject-silicon-$VERSION" --dest build/
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
Expand All @@ -179,6 +179,74 @@ jobs:
# pip install "dmgbuild"
# dmgbuild -s build-cfg/dmgbuild.py "$MAC_APP_NAME" build/ganttproject-$VERSION.dmg

- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'

- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'

- name: 'Use gcloud CLI'
run: 'gcloud info'

- name: Upload artifacts
run: |
#!/bin/sh
cd build
for f in *.dmg; do
gsutil cp $f gs://dl.ganttproject.biz && gsutil acl ch -u AllUsers:R gs://dl.ganttproject.biz/$f;
done;
macOS_intel:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Checkout submodules
shell: bash
run: |
git submodule sync --recursive
git submodule update --init --force --recursive --depth=1
echo "$VERSION" > ganttproject-builder/VERSION
- uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: 17.0.9
java-package: jdk+fx
cache: 'gradle'
- name: Build GanttProject
run: |
./gradlew distbin
echo "===== PLUGINS ====="
ls ganttproject-builder/dist-bin/plugins/base
- name: Build GanttProject.app
run: |
./build-bin/package-mac.sh
./build/GanttProject.app/Contents/MacOS/GanttProject -h || echo "failed to run"
# - name: Sign GanttProject.app
# run: |
# echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
#
# security create-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
# security default-keychain -s build.keychain
# security unlock-keychain -p "$MACOS_CI_KEYCHAIN_PWD" build.keychain
# security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PWD" -T /usr/bin/codesign
#
# build-bin/notarize.sh $VERSION "$MACOS_CERTIFICATE_NAME" "qwer" sign

- name: Create temporary DMG for notarization
run: |
jpackage --type dmg --app-image build/GanttProject.app -n "ganttproject-intel-$VERSION" --dest build/
# - uses: actions/setup-python@v4
# with:
# python-version: '3.10'
# - name: Build DMG
# run: |
# pip install "dmgbuild"
# dmgbuild -s build-cfg/dmgbuild.py "$MAC_APP_NAME" build/ganttproject-$VERSION.dmg

- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
Expand Down

0 comments on commit e247547

Please sign in to comment.