Skip to content

Build installer

Build installer #361

name: Build installer
on:
workflow_dispatch:
schedule:
- cron: '15 1 * * *'
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Ant
run: ant -noinput -buildfile build.xml windows-installer
- name: Upload Windows Installer
uses: actions/upload-artifact@v4
with:
name: elamx-windows
path: "dist/*.exe"
retention-days: 1
- name: Upload Windows Zip
uses: actions/upload-artifact@v4
with:
name: elamx-windows-zip
path: "dist/*.zip"
retention-days: 1
- name: Get Nightly Release Date
run: |
chcp 65001 #set code page to utf-8
echo ("NIGHTLYDATE=" + (Get-Date -format "yyyy-MM-dd")) >> $env:GITHUB_ENV
- name: Update Latest Nightly Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: false
artifacts: dist\elamx2_windows.zip,dist\eLamX.3.0.0-beta.exe
artifactContentType: "raw"
name: Latest Nightly ${{ env.NIGHTLYDATE }}
prerelease: true
replacesArtifacts: true
tag: nightly
token: ${{ secrets.GITHUB_TOKEN }}
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - name: Delete old release assets
# uses: mknejp/delete-release-assets@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# tag: nightly
#
# # Pick one of:
# # 1. a single file name
# assets: eLamX.2.7.exe
- name: Install xmllint
run: sudo apt-get install -y libfuse2
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Ant
run: ant -noinput -buildfile build.xml linux-appimage
- name: Upload Linux AppIamge
uses: actions/upload-artifact@v4
with:
name: elamx-linux-appimage
path: "dist/eLamX2-x86_64.AppImage"
retention-days: 1
- name: Upload Linux Zip
uses: actions/upload-artifact@v4
with:
name: elamx-linux-zip
path: "dist/*.zip"
retention-days: 1
- name: Update Nightly TAG
uses: richardsimko/update-tag@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: nightly
- name: Get Nightly Release Date
run: |
echo "NIGHTLYDATE=$(date '+%Y-%m-%d')" >> $GITHUB_ENV
- name: Update Latest Nightly Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: false
artifacts: dist/elamx2_linux.zip,dist/eLamX2-x86_64.AppImage
artifactContentType: "raw"
name: Latest Nightly ${{ env.NIGHTLYDATE }}
prerelease: true
replacesArtifacts: true
tag: nightly
token: ${{ secrets.GITHUB_TOKEN }}
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Build with Ant
run: ant -noinput -buildfile build.xml macos-zip
- name: Upload Linux Zip
uses: actions/upload-artifact@v4
with:
name: elamx-macos-zip
path: "dist/*.zip"
retention-days: 1
- name: Get Nightly Release Date
run: |
echo "NIGHTLYDATE=$(date '+%Y-%m-%d')" >> $GITHUB_ENV
- name: Update Latest Nightly Release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: false
artifacts: dist/elamx2_macos.zip
artifactContentType: "raw"
name: Latest Nightly ${{ env.NIGHTLYDATE }}
prerelease: true
replacesArtifacts: true
tag: nightly
token: ${{ secrets.GITHUB_TOKEN }}