-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
build: Add workflow for M1 and bump versions #567
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
name: MacOs Bundles | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
app-version: | ||
required: true | ||
type: string | ||
project-version: | ||
required: true | ||
type: string | ||
java-version: | ||
default: '19' | ||
required: false | ||
type: string | ||
javafx-version: | ||
default: '19' | ||
required: false | ||
type: string | ||
test: | ||
default: false | ||
required: false | ||
type: boolean | ||
secrets: | ||
CERTIFICATES_FILE_BASE64: | ||
required: true | ||
CERTIFICATES_PASSWORD: | ||
required: true | ||
NOTARIZATION_USERNAME: | ||
required: true | ||
NOTARIZATION_PASSWORD: | ||
required: true | ||
MACSIGN_USER: | ||
required: true | ||
MACSIGN_PREFIX: | ||
required: true | ||
jobs: | ||
build: | ||
name: macOS on M1 | ||
runs-on: [macOS, ARM64] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Java | ||
uses: oracle-actions/setup-java@v1 | ||
with: | ||
website: jdk.java.net | ||
release: ${{ inputs.java-version }} | ||
|
||
- uses: Apple-Actions/import-codesign-certs@v1 | ||
with: | ||
p12-file-base64: ${{ secrets.CERTIFICATES_FILE_BASE64 }} | ||
p12-password: ${{ secrets.CERTIFICATES_PASSWORD }} | ||
|
||
- name: Setup JavaFX | ||
run: | | ||
wget -P /tmp https://download2.gluonhq.com/openjfx/${{ inputs.javafx-version }}/openjfx-${{ inputs.javafx-version }}_osx-aarch64_bin-jmods.zip | ||
unzip /tmp/openjfx-${{ inputs.javafx-version }}_osx-aarch64_bin-jmods.zip -d /tmp | ||
|
||
- name: Cache Maven packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.m2 | ||
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: ${{ runner.os }}-m2 | ||
|
||
- name: Run Tests | ||
if: ${{ inputs.test }} | ||
run: | | ||
mvn -B -ntp clean verify checkstyle:checkstyle --no-transfer-progress | ||
|
||
- name: Build and package JAR | ||
run: | | ||
mvn -B -ntp -q versions:set -DnewVersion=${{ env.APP_VERSION }} -DgenerateBackupPoms=false | ||
mvn -B -ntp -q clean package -Dmaven.test.skip=true | ||
env: | ||
APP_VERSION: ${{ inputs.app-version }} | ||
|
||
- name: Create Bundle using JPackage | ||
id: outputfile | ||
run: | | ||
.github/scripts/jpackage.sh \ | ||
--icon app/assets/osx/icon-mac.icns \ | ||
--java-options '"--add-opens=javafx.fxml/javafx.fxml=ALL-UNNAMED"' \ | ||
--type dmg \ | ||
--mac-package-identifier com.gluonhq.scenebuilder \ | ||
--mac-package-name 'Scene Builder' \ | ||
--mac-package-signing-prefix "${{ env.MACSIGN_PREFIX }}" \ | ||
--mac-signing-key-user-name "${{ env.MACSIGN_USER }}" \ | ||
--mac-sign | ||
mv ${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.APP_VERSION }}.dmg ${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.PROJECT_VERSION }}.dmg | ||
ls ${{ env.INSTALL_DIR }} | ||
echo ::set-output name=path::${{ env.INSTALL_DIR }}/SceneBuilder-${{ env.PROJECT_VERSION }}.dmg | ||
env: | ||
MAIN_CLASS: com.oracle.javafx.scenebuilder.app.SceneBuilderApp | ||
JAVAFX_HOME: /tmp/javafx-jmods-${{ inputs.javafx-version }}/ | ||
JPACKAGE_HOME: ${{ env.JAVA_HOME }} | ||
MACSIGN_PREFIX: ${{ secrets.MACSIGN_PREFIX }} | ||
MACSIGN_USER: ${{ secrets.MACSIGN_USER }} | ||
PROJECT_VERSION: ${{ inputs.project-version }} | ||
APP_VERSION: ${{ inputs.app-version }} | ||
INSTALL_DIR: app/target/install | ||
|
||
- name: Notarize Release Build | ||
uses: erwin1/xcode-notarize@main | ||
with: | ||
product-path: ${{ steps.outputfile.outputs.path }} | ||
appstore-connect-username: ${{ secrets.NOTARIZATION_USERNAME }} | ||
appstore-connect-password: ${{ secrets.NOTARIZATION_PASSWORD }} | ||
primary-bundle-id: com.gluonhq.scenebuilder | ||
asc-provider: ${{ secrets.MACSIGN_PREFIX }} | ||
verbose: true | ||
|
||
- name: Upload Artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifacts | ||
path: ${{ steps.outputfile.outputs.path }} |
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
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
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the original
2015-2021
, should it be2015-2022
or is2016
the correct start year?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am just following the copyright of the repo license. Checking the licenses of some old SB repos, while Gluon copyright always starts on 2016, it is likely that the
about.copyright.open
message was initially wrong (in fact the file header uses 2016).