Skip to content

Commit

Permalink
Merge pull request #363 from asterics/alija/feature/build-workflows
Browse files Browse the repository at this point in the history
Build AsTeRICS with GitHub Actions
  • Loading branch information
sabicalija authored Jan 8, 2024
2 parents 0070a0f + 06879cd commit 4d21012
Show file tree
Hide file tree
Showing 5 changed files with 254 additions and 1 deletion.
65 changes: 65 additions & 0 deletions .github/workflows/release-linux.yml
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
68 changes: 68 additions & 0 deletions .github/workflows/release-mac.yml
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 }}
64 changes: 64 additions & 0 deletions .github/workflows/release-windows.yml
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
57 changes: 57 additions & 0 deletions .github/workflows/release.yml
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 }}
1 change: 0 additions & 1 deletion Installer/setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ begin

Splash.Width := BitmapImage1.Width;
Splash.Height := BitmapImage1.Height;
Splash.Center;
Splash.Show;

BitmapImage1.Refresh;
Expand Down

0 comments on commit 4d21012

Please sign in to comment.