Bumped version number to 3.8.1 and bumped API version to 3.1.0. #110
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
name: Build Installers | |
on: | |
push: | |
paths: | |
- '.github/workflows/build-installers.yml' | |
- 'version.properties' | |
- 'bluej/build.gradle' | |
- 'greenfoot/build.gradle' | |
- 'bluej/package/build.xml' | |
- 'bluej/package/greenfoot-build.xml' | |
workflow_dispatch: | |
jobs: | |
Build-Windows-Installers: | |
runs-on: windows-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Load .env file | |
uses: xom9ikk/dotenv@v2 | |
- name: Install Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ env.java_version }} | |
java-package: jdk | |
architecture: x64 | |
- name: Install choco packages | |
run: | | |
choco install wixtoolset -r --no-progress | |
choco install msys2 -r --no-progress | |
choco install mingw -r --no-progress | |
choco install sed -r --no-progress | |
choco install wget -r --no-progress | |
choco install ant -r --no-progress | |
- name: Check install locations | |
run: | | |
dir C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin | |
dir 'C:/Program Files/' | |
dir 'C:/Program Files (x86)/' | |
dir 'C:/Program Files (x86)/WiX Toolset v3.11/bin' | |
- name: Install JavaFX and build | |
run: | | |
cd ${{ github.workspace }} | |
mkdir javafx && cd javafx && bash ../download-javafx.sh ${{ env.javafx_version }} win && cd .. | |
$propfile = 'tools.properties' | |
$java_home_forward = $env:JAVA_HOME -replace '\\', '/' | |
$workspace_forward = $PWD -replace '\\', '/' | |
(Get-Content $propfile) -replace 'mingw_root=.*', "mingw_root=C:/ProgramData/chocolatey/lib/mingw/tools/install/mingw64" | Set-Content $propfile | |
(Get-Content $propfile) -replace 'wix_bin=.*', "wix_bin=C:/Program Files (x86)/WiX Toolset v3.11/bin" | Set-Content $propfile | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@859c33240bd026ce8d5f711f5adcc65c2f8eafc1 | |
- name: Gradle Build and Test | |
uses: gradle/gradle-build-action@0842a550d10f5211be8c8295f6888889e1fca291 | |
with: | |
arguments: :bluej:packageBlueJWindows :greenfoot:packageGreenfootWindows --info --stacktrace --no-daemon | |
- name: Archive BlueJ Windows installers | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bluej-installers-windows | |
path: | | |
bluej/package/BlueJ-windows*.msi | |
bluej/package/BlueJ-windows*.zip | |
- name: Archive Greenfoot Windows installers | |
uses: actions/upload-artifact@v3 | |
with: | |
name: greenfoot-installers-windows | |
path: | | |
bluej/package/Greenfoot-windows*.msi | |
bluej/package/Greenfoot-windows*.zip | |
Build-Ubuntu-Installers: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Load .env file | |
uses: xom9ikk/dotenv@v2 | |
- name: Install Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ env.java_version }} | |
java-package: jdk | |
architecture: x64 | |
- name: Install packages | |
run: | | |
sudo apt install fakeroot | |
- name: Check install locations | |
run: | | |
ls $JAVA_HOME | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@859c33240bd026ce8d5f711f5adcc65c2f8eafc1 | |
- name: Gradle Build and Test | |
uses: gradle/gradle-build-action@0842a550d10f5211be8c8295f6888889e1fca291 | |
with: | |
arguments: :bluej:packageBlueJLinux :greenfoot:packageGreenfootLinux --info --stacktrace --no-daemon | |
- name: Archive BlueJ Ubuntu installers | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bluej-installers-other | |
path: | | |
bluej/package/BlueJ-linux*.deb | |
bluej/package/BlueJ-generic*.jar | |
- name: Archive Greenfoot Ubuntu installers | |
uses: actions/upload-artifact@v3 | |
with: | |
name: greenfoot-installers-other | |
path: | | |
bluej/package/Greenfoot-linux*.deb | |
bluej/package/Greenfoot-generic*.jar | |
Build-Mac-Installers: | |
runs-on: macos-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Load .env file | |
uses: xom9ikk/dotenv@v2 | |
- name: Install Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: ${{ env.java_version }} | |
java-package: jdk | |
architecture: x64 | |
- name: Check install locations | |
run: | | |
ls $JAVA_HOME | |
- name: Run setup | |
run: | | |
brew install grep | |
brew install imagemagick | |
brew install npm && npm install -g appdmg | |
cd ${{ github.workspace }} | |
echo 'ant_exe=ant' > tools.properties | |
- name: Install the Apple certificate and provisioning profile | |
env: | |
BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | |
P12_PASSWORD: ${{ secrets.P12_PASSWORD }} | |
KEYCHAIN_PASSWORD: Vh4o2zhsnBE5f | |
run: | | |
# From https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development | |
# create variables | |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12 | |
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db | |
# import certificate and provisioning profile from secrets | |
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o $CERTIFICATE_PATH | |
# create temporary keychain | |
security create-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH | |
security unlock-keychain -p "$KEYCHAIN_PASSWORD" $KEYCHAIN_PATH | |
# import certificate to keychain | |
security import $CERTIFICATE_PATH -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH | |
security list-keychain -d user -s $KEYCHAIN_PATH | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@859c33240bd026ce8d5f711f5adcc65c2f8eafc1 | |
- name: Gradle Build and Test | |
uses: gradle/gradle-build-action@0842a550d10f5211be8c8295f6888889e1fca291 | |
with: | |
arguments: :bluej:packageBlueJMac :greenfoot:packageGreenfootMac --info --stacktrace --no-daemon | |
- name: Sign and package | |
run: | | |
cd ${{ github.workspace }} | |
cd bluej/package | |
mkdir tmpsign | |
cd tmpsign | |
bash ../sign-mac.sh ${{ secrets.DEVELOPER_NAME }} ../BlueJ-mac*.zip ${{ secrets.APPLEID_EMAIL }} ${{ secrets.APPLEID_PASSWORD }} ${{ secrets.APPLEID_TEAMID }} `basename ../BlueJ-mac*.zip .zip`.dmg bluej_appdmg.json bluej-installer-icon | |
bash ../sign-mac.sh ${{ secrets.DEVELOPER_NAME }} ../Greenfoot-mac*.zip ${{ secrets.APPLEID_EMAIL }} ${{ secrets.APPLEID_PASSWORD }} ${{ secrets.APPLEID_TEAMID }} `basename ../Greenfoot-mac*.zip .zip`.dmg greenfoot_appdmg.json greenfoot-installer-icon | |
- name: Archive BlueJ Mac installers | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bluej-installers-mac | |
path: | | |
bluej/package/BlueJ*.dmg | |
- name: Archive Greenfoot Mac installers | |
uses: actions/upload-artifact@v3 | |
with: | |
name: greenfoot-installers-mac | |
path: | | |
bluej/package/Greenfoot*.dmg | |