Skip to content

Nightly Build (SNAPSHOT release) #652

Nightly Build (SNAPSHOT release)

Nightly Build (SNAPSHOT release) #652

Workflow file for this run

name: Nightly Build (SNAPSHOT release)
on:
workflow_dispatch
permissions:
contents: read
id-token: write
jobs:
# Builds all native images and uploads each binary as a separate artifact
build-natives:
name: Build native images
runs-on: ${{ matrix.os }}
strategy:
matrix: # ATTENTION: see also release.yml, image name are referenced in cli/src/main/assembly/*.xml files, on update do not forget to also update there
os: [ windows-latest, ubuntu-latest, ubuntu-22.04-arm, macos-latest, macos-15-intel ]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: graalvm/setup-graalvm@v1
with:
java-version: '25'
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'
- name: Build native image
shell: bash
run: |
maven_config="$(cat .mvn/maven.config)"
current_version="${maven_config/#*-Drevision=}"
current_version="${current_version/ */}"
current_version="${current_version/-SNAPSHOT/-$(date +%m_%d_%H)-SNAPSHOT}"
cd cli
mvn -B -ntp -Pnative -DskipTests=true -Drevision=${current_version} package
- name: Upload native image
uses: actions/upload-artifact@v4
with:
name: natives-${{ matrix.os }}
path: cli/target/ideasy*
- name: Build MSI with WixToolSet
if: runner.os == 'Windows'
shell: bash
run: |
cd documentation
mvn -B -ntp clean install
cd ..
mkdir -p windows-installer/msi-files
cp documentation/target/generated-docs/IDEasy.pdf windows-installer/msi-files
cp -r cli/target/package/* windows-installer/msi-files
rm -rf windows-installer/msi-files/system/mac
rm -rf windows-installer/msi-files/system/linux
cp cli/target/ideasy.exe windows-installer/msi-files/bin
cd windows-installer
dotnet tool install --global wix --version 5.0.2
wix extension add WixToolset.UI.wixext/5.0.2
wix extension add WixToolset.Util.wixext/5.0.2
wix build Package.wxs WixUI_IDEasySetup.wxs -loc Package.en-us.wxl -ext WixToolset.UI.wixext -ext WixToolset.Util.wixext -o ideasy.msi
- name: Upload unsigned MSI
if: runner.os == 'Windows'
id: upload-msi
uses: actions/upload-artifact@v4
with:
name: msi-unsigned
path: windows-installer/ideasy.msi
- name: Sign MSI
if: runner.os == 'Windows'
uses: signpath/github-action-submit-signing-request@v2
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '428e13ed-ca0c-47ca-8a73-63b76cabb59b'
project-slug: 'IDEasy'
signing-policy-slug: 'test-signing'
artifact-configuration-slug: 'IDEasy'
github-artifact-id: '${{ steps.upload-msi.outputs.artifact-id }}'
wait-for-completion: true
output-artifact-directory: 'windows-installer/signed'
- name: Upload MSI
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: msi
path: windows-installer/signed/ideasy.msi
# Downloads all native image artifacts to cli/target and builds the project using assemblies for final deployment to OSSRH Nexus
deploy:
name: Build Project and Deploy
needs: [ build-natives ]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '25'
- name: Download natives and build project
uses: actions/download-artifact@v4
with:
path: ./cli/target/
- name: Deploy to OSSRH nexus
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: mvn --settings .mvn/settings.xml -DskipTests=true -Darchetype.test.skip=true -Dgpg.skip=true -Dstyle.color=always -B -ntp -Passembly,msi,deploy deploy