Skip to content

Merge pull request #74 from data-catering/data-contract-cli #124

Merge pull request #74 from data-catering/data-contract-cli

Merge pull request #74 from data-catering/data-contract-cli #124

Workflow file for this run

name: Build docker images and OS installations
on:
push:
tags: ["*"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
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: Upload jpackage jar
uses: actions/upload-artifact@v4
with:
name: jars
path: "app/build/libs/data-caterer.jar"
overwrite: true
osx:
needs: build
runs-on: [macos-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set version
run: echo "APP_VERSION=$(grep version gradle.properties | cut -d= -f2)" >> $GITHUB_ENV
- uses: actions/setup-java@v4
with:
java-version: '21'
java-package: jdk
architecture: x64
distribution: oracle
- name: Download fat jar
uses: actions/download-artifact@v4
with:
name: jars
path: app/build/libs/
- name: Package jar as dmg installer
run: 'jpackage --main-jar data-caterer.jar "@misc/jpackage/jpackage.cfg" "@misc/jpackage/jpackage-mac.cfg"'
- name: Upload dmg
uses: actions/upload-artifact@v4
with:
name: data-caterer-mac
path: "DataCaterer-1.0.0.dmg"
overwrite: true
windows:
needs: build
runs-on: [windows-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set version
run: echo "APP_VERSION=$(grep version gradle.properties | cut -d= -f2)" >> $env:GITHUB_ENV
- uses: actions/setup-java@v4
with:
java-version: '21'
java-package: jdk
architecture: x64
distribution: oracle
- name: Download fat jar
uses: actions/download-artifact@v4
with:
name: jars
path: app/build/libs/
- name: Package jar as exe
run: 'jpackage --main-jar data-caterer.jar "@misc/jpackage/jpackage.cfg" "@misc/jpackage/jpackage-windows.cfg"'
- name: Upload installer
uses: actions/upload-artifact@v4
with:
name: data-caterer-windows
path: "DataCaterer-1.0.0.exe"
overwrite: true
linux:
needs: build
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Set version
run: echo "APP_VERSION=$(grep version gradle.properties | cut -d= -f2)" >> $GITHUB_ENV
- uses: actions/setup-java@v4
with:
java-version: '21'
java-package: jdk
architecture: x64
distribution: oracle
- name: Download fat jar
uses: actions/download-artifact@v4
with:
name: jars
path: app/build/libs/
- name: Package jar as debian package
run: 'jpackage --main-jar data-caterer.jar "@misc/jpackage/jpackage.cfg" "@misc/jpackage/jpackage-linux.cfg"'
- name: List directory
run: ls -lart
- name: Upload deb
uses: actions/upload-artifact@v4
with:
name: data-caterer-linux
path: "datacaterer_1.0.0_amd64.deb"
overwrite: true