-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #363 from asterics/alija/feature/build-workflows
Build AsTeRICS with GitHub Actions
- Loading branch information
Showing
5 changed files
with
254 additions
and
1 deletion.
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,65 @@ | ||
name: Release (Linux) | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version Number" | ||
required: true | ||
type: string | ||
platform: | ||
description: "Platform Type" | ||
required: false | ||
default: ubuntu-latest | ||
type: choice | ||
options: | ||
- ubuntu-latest | ||
- ubuntu-22.04 | ||
- ubuntu-20.04 | ||
- ubuntu-18.04 | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: "Version Number" | ||
required: true | ||
type: string | ||
platform: | ||
description: "Platform Type" | ||
default: ubuntu-latest | ||
required: true | ||
type: string | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
ARTIFACT: AsTeRICS ${{ inputs.version }} (${{ inputs.platform }}) | ||
jobs: | ||
build: | ||
runs-on: ${{ inputs.platform }} | ||
steps: | ||
- name: Get Code | ||
uses: actions/checkout@v3 | ||
- name: Install JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "8" | ||
distribution: "zulu" | ||
java-package: "jdk+fx" | ||
architecture: "x64" | ||
check-latest: true | ||
- name: Build AsTeRICS | ||
run: ant -buildfile Installer/asterics-are/build.xml deploy -Dfx.deploy.nativeBundles=deb -Dfx.application.version=$VERSION -Dfx.deploy.verbose=true | ||
- name: Release .deb File | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.ARTIFACT }} | ||
path: Installer/asterics-are/build/deploy/bundles/asterics-are-${{ env.VERSION }}.deb | ||
install: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get Software | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ env.ARTIFACT }} | ||
- name: Setup Machine | ||
run: sudo mkdir /usr/share/desktop-directories | ||
- name: Install Package | ||
run: sudo apt install ./asterics-are-${{ env.VERSION }}.deb |
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,68 @@ | ||
name: Release (macOS) | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version Number" | ||
required: true | ||
type: string | ||
platform: | ||
description: "Platform Type" | ||
required: false | ||
default: macos-latest | ||
type: choice | ||
options: | ||
- macos-latest | ||
- macos-12 | ||
- macos-11 | ||
- macos-10.15 | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: "Version Number" | ||
required: true | ||
type: string | ||
platform: | ||
description: "Platform Type" | ||
default: macos-latest | ||
required: true | ||
type: string | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
ARTIFACT: AsTeRICS ${{ inputs.version }} (${{ inputs.platform }}) | ||
jobs: | ||
build: | ||
runs-on: ${{ inputs.platform }} | ||
steps: | ||
- name: Get Code | ||
uses: actions/checkout@v3 | ||
- name: Install JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "8" | ||
distribution: "zulu" | ||
java-package: "jdk+fx" | ||
architecture: "x64" | ||
check-latest: true | ||
- name: Move JDK | ||
run: | | ||
shopt -s extglob | ||
mkdir -p $JAVA_HOME/Contents/Home | ||
cp -r $JAVA_HOME/!(Contents) $JAVA_HOME/Contents/Home/ | ||
- name: Build AsTeRICS | ||
env: | ||
JAVA_HOME: ${{ env.JAVA_HOME_8_X64 }}/Contents/Home | ||
run: ant -buildfile Installer/asterics-are/build.xml deploy -Dfx.deploy.nativeBundles=dmg -DAPE.embedJava=true -Dfx.application.version=$VERSION -Dfx.deploy.verbose=true | ||
- name: Release .dmg File | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.ARTIFACT }} | ||
path: Installer/asterics-are/build/deploy/bundles/asterics-are-javaembedded-${{ env.VERSION }}.dmg | ||
install: | ||
needs: build | ||
runs-on: macos-latest | ||
steps: | ||
- name: Get Software | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ env.ARTIFACT }} |
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,64 @@ | ||
name: Release (Windows) | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version Number" | ||
required: true | ||
type: string | ||
platform: | ||
description: "Platform Type" | ||
required: false | ||
default: windows-latest | ||
type: choice | ||
options: | ||
- windows-latest | ||
- windows-2022 | ||
- windows-2019 | ||
workflow_call: | ||
inputs: | ||
version: | ||
description: "Version Number" | ||
required: true | ||
type: string | ||
platform: | ||
description: "Platform Type" | ||
default: windows-latest | ||
required: true | ||
type: string | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
ARTIFACT: AsTeRICS ${{ inputs.version }} (${{ inputs.platform }}) | ||
jobs: | ||
build: | ||
runs-on: ${{ inputs.platform }} | ||
steps: | ||
- name: Get Code | ||
uses: actions/checkout@v3 | ||
- name: Install JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: "8" | ||
distribution: "zulu" | ||
java-package: "jdk+fx" | ||
architecture: "x64" | ||
check-latest: true | ||
- name: Build AsTeRICS | ||
run: bash -ex ./Installer/jenkins-release-script.sh | ||
- name: Release .exe File | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.ARTIFACT }} | ||
path: Setup_AsTeRICS_${{ env.VERSION }}.exe | ||
install: | ||
needs: build | ||
runs-on: windows-latest | ||
steps: | ||
- name: Get Software | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ env.ARTIFACT }} | ||
- name: List directory content | ||
run: dir | ||
- name: Install Package | ||
run: start Setup_AsTeRICS_${{ env.VERSION }}.exe |
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,57 @@ | ||
name: Release | ||
on: | ||
schedule: | ||
- cron: "0 12 * * *" | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "Version Number" | ||
type: string | ||
push: | ||
tags: | ||
- v[0-9]+.[0-9]+.[0-9]+ | ||
jobs: | ||
version: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.version.outputs.version || steps.custom.outputs.version || steps.tag.outputs.version }} | ||
steps: | ||
- name: Output Version | ||
id: version | ||
if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.version == '' ) }} | ||
run: echo "version=$(date +'%Y%m%d-%H%M')" >> $GITHUB_OUTPUT | ||
- name: Output Custom Version | ||
id: custom | ||
if: ${{ github.event_name == 'workflow_dispatch' && inputs.version != '' }} | ||
run: echo "version=${{ inputs.version }}" >> $GITHUB_OUTPUT | ||
- name: Output Tag | ||
id: tag | ||
if: ${{ github.event_name == 'push' }} | ||
run: echo "version=$(echo ${GITHUB_REF#refs/*/} | sed -e 's/v//')" >> $GITHUB_OUTPUT | ||
linux: | ||
needs: version | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04, ubuntu-20.04] | ||
uses: ./.github/workflows/release-linux.yml | ||
with: | ||
version: ${{ needs.version.outputs.version }} | ||
platform: ${{ matrix.os }} | ||
windows: | ||
needs: version | ||
strategy: | ||
matrix: | ||
os: [windows-2022, windows-2019] | ||
uses: ./.github/workflows/release-windows.yml | ||
with: | ||
version: ${{ needs.version.outputs.version }} | ||
platform: ${{ matrix.os }} | ||
mac: | ||
needs: version | ||
strategy: | ||
matrix: | ||
os: [macos-12, macos-11] | ||
uses: ./.github/workflows/release-mac.yml | ||
with: | ||
version: ${{ needs.version.outputs.version }} | ||
platform: ${{ matrix.os }} |
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