Skip to content

Add in github action for creating Mac, Linux and Windows installation… #27

Add in github action for creating Mac, Linux and Windows installation…

Add in github action for creating Mac, Linux and Windows installation… #27

Workflow file for this run

name: Build docker images and OS installations
on:
push:
branches:
- main
- dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_HUB_USER }}
# password: ${{ secrets.DOCKER_HUB_TOKEN }}
# - name: Build and push images
# run: bash docker-action.sh
# env:
# PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
# MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
# MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
# ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
# ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID }}
# ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
- name: Build jpackage jar
run: JPACKAGE_BUILD=true ./gradlew clean :api:shadowJar :app:shadowJar
- name: Upload jpackage jar
uses: actions/upload-artifact@v1
with:
name: jars
path: "app/build/libs/*.jar"
overwrite: "true"
osx:
needs: build
runs-on: [macos-latest]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set version
run: echo "APP_VERSION=$(grep version gradle.properties | cut -d= -f2)" >> $GITHUB_ENV
- uses: actions/setup-java@v1
with:
java-version: '14.0.0'
java-package: jdk
architecture: x64
- name: Download fat jar
uses: actions/download-artifact@v3
with:
name: jars
- name: Package jar as dmg installer
run: 'jpackage "@misc/jpackage/jpackage.cfg" "@misc/jpackage/jpackage-mac.cfg"'
- name: Upload dmg
uses: actions/upload-artifact@v3
with:
name: dmg
path: "DataCaterer-1.0.0.dmg"
windows:
needs: build
runs-on: [windows-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: actions/setup-java@v1
with:
java-version: '14.0.0'
java-package: jdk
architecture: x64
- name: Download fat jar
uses: actions/download-artifact@v3
with:
name: jars
- name: Package jar as exe
run: 'jpackage "@misc/jpackage/jpackage.cfg" "@misc/jpackage/jpackage-windows.cfg"'
- name: Upload installer
uses: actions/upload-artifact@v3
with:
name: msi
path: "DataCaterer-1.0.0.exe"
linux:
needs: build
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- uses: actions/setup-java@v1
with:
java-version: '14.0.0'
java-package: jdk
architecture: x64
- name: Download fat jar
uses: actions/download-artifact@v3
with:
name: jars
- name: Package jar as debian package
run: 'jpackage "@misc/jpackage/jpackage.cfg" "@misc/jpackage/jpackage-linux.cfg"'
- name: Upload deb
uses: actions/upload-artifact@v3
with:
name: deb
path: "DataCaterer-1.0.0.deb"