Skip to content

Commit 9f421c7

Browse files
committed
Finalize release build
1 parent 0df9dfe commit 9f421c7

7 files changed

Lines changed: 97 additions & 74 deletions

File tree

.github/actions/build-installers/action.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ runs:
2121
java-version: '21'
2222
distribution: 'temurin'
2323

24+
- name: Download bundle
25+
uses: actions/download-artifact@v8
26+
with:
27+
name: bundle
28+
path: dist
29+
30+
- name: Download NBPackage
31+
uses: actions/download-artifact@v8
32+
with:
33+
name: nbpackage
34+
path: installers/nbpackage
35+
2436
- name: Download JDKs
2537
run: bash download-jdks.sh ${{ inputs.os }} ${{ inputs.arch }}
2638
working-directory: installers
@@ -34,4 +46,11 @@ runs:
3446
- name: Build installers
3547
run: bash build-installers.sh ${{ inputs.tag }} ${{ inputs.os }} ${{ inputs.arch }}
3648
working-directory: installers
37-
shell: bash
49+
shell: bash
50+
51+
- name: Upload installers
52+
uses: actions/upload-artifact@v7
53+
with:
54+
name: installers-${{ matrix.os }}
55+
path: dist/installers/*
56+
compression-level: 0

.github/actions/build-sdk/action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,13 @@ runs:
4545
- name: Build distributable ZIP
4646
if: inputs.createBundle == 'true'
4747
run: ant -Dstorepass="$NBM_SIGN_PASS" -Dpack200.enabled=false set-spec-version build-zip unset-spec-version
48-
shell: bash
48+
shell: bash
49+
50+
- name: Upload distributable ZIP bundle
51+
if: inputs.createBundle == 'true'
52+
uses: actions/upload-artifact@v7
53+
with:
54+
name: bundle
55+
path: dist/jmonkeyplatform.zip
56+
compression-level: 0
57+
if-no-files-found: error

.github/actions/nbm-deployment/action.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,24 @@ inputs:
99
runs:
1010
using: "composite"
1111
steps:
12-
- name: Checkout the nightly-trigger repository
13-
uses: actions/checkout@v6
14-
with:
15-
repository: 'jMonkeyEngine/sdk-update-center'
16-
ref: nightly
17-
path: nightly
18-
token: ${{ inputs.token }}
12+
- name: Checkout the nightly-trigger repository
13+
uses: actions/checkout@v6
14+
with:
15+
repository: 'jMonkeyEngine/sdk-update-center'
16+
ref: nightly
17+
path: nightly
18+
token: ${{ inputs.token }}
1919

20-
- name: Setup Git for the commit
21-
run: git config user.email MeFisto94@users.noreply.github.com && git config user.name MeFisto94
22-
working-directory: nightly
20+
- name: Setup Git for the commit
21+
run: git config user.email MeFisto94@users.noreply.github.com && git config user.name MeFisto94
22+
working-directory: nightly
23+
shell: bash
2324

24-
- name: Overwrite the target file
25-
run: rm -rf nightly/target && echo 'echo "sdk_sha=${{ github.sha }}" >> $GITHUB_ENV' > nightly/target
25+
- name: Overwrite the target file
26+
run: rm -rf nightly/target && echo 'echo "sdk_sha=${{ github.sha }}" >> $GITHUB_ENV' > nightly/target
27+
shell: bash
2628

27-
- name: Trigger nightly builds
28-
working-directory: nightly
29-
run: git add target && git commit -m "Trigger a fresh nightly build for https://github.com/jMonkeyEngine/sdk/commit/${{ github.sha }}" && git push
29+
- name: Trigger nightly builds
30+
working-directory: nightly
31+
run: git add target && git commit -m "Trigger a fresh nightly build for https://github.com/jMonkeyEngine/sdk/commit/${{ github.sha }}" && git push
32+
shell: bash

.github/actions/prepare-installers/action.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,11 @@ runs:
77
- name: Prepare NBPackage
88
run: bash prepare-installers.sh
99
working-directory: installers
10-
shell: bash
10+
shell: bash
11+
12+
- name: Upload NBPackage
13+
uses: actions/upload-artifact@v7
14+
with:
15+
name: nbpackage
16+
path: installers/nbpackage/
17+
compression-level: 9
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Publish Release"
2+
description: "Create GitHub release from artifacts"
3+
4+
inputs:
5+
tag:
6+
required: true
7+
description: "Tag should be used for releases"
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
- name: Download installers
13+
uses: actions/download-artifact@v8
14+
with:
15+
pattern: installers-*
16+
path: release-assets
17+
merge-multiple: true
18+
19+
- name: Download ZIP bundle
20+
uses: actions/download-artifact@v8
21+
with:
22+
name: bundle
23+
path: release-assets
24+
25+
- name: Create Release
26+
uses: softprops/action-gh-release@v3
27+
with:
28+
files: release-assets/*
29+
tag_name: ${{ github.ref }}
30+
name: Release ${{ github.ref }}
31+
env:
32+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/release.yml

Lines changed: 1 addition & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,6 @@ jobs:
2323
- name: Prepare installers
2424
uses: ./.github/actions/prepare-installers
2525

26-
- name: Upload distributable ZIP bundle
27-
uses: actions/upload-artifact@v7
28-
with:
29-
name: bundle
30-
path: dist/jmonkeyplatform.zip
31-
compression-level: 0
32-
if-no-files-found: error
33-
34-
- name: Upload NBPackage
35-
uses: actions/upload-artifact@v7
36-
with:
37-
name: nbpackage
38-
path: installers/nbpackage/
39-
compression-level: 9
40-
4126
# -------------------------------
4227
# 2. Native installer packaging (matrix)
4328
# -------------------------------
@@ -53,31 +38,13 @@ jobs:
5338
steps:
5439
- uses: actions/checkout@v6
5540

56-
- name: Download bundle
57-
uses: actions/download-artifact@v8
58-
with:
59-
name: bundle
60-
path: dist
61-
62-
- name: Download NBPackage
63-
uses: actions/download-artifact@v8
64-
with:
65-
name: nbpackage
66-
path: installers/nbpackage
67-
6841
- name: Build installers
6942
uses: ./.github/actions/build-installers
7043
with:
7144
tag: ${{ github.ref_name }}
7245
os: ${{ runner.os }}
7346
arch: ${{ runner.arch }}
7447

75-
- name: Upload installers
76-
uses: actions/upload-artifact@v7
77-
with:
78-
name: installers-${{ matrix.os }}
79-
path: dist/installers/**
80-
8148
# -------------------------------
8249
# 3. Release
8350
# -------------------------------
@@ -91,22 +58,4 @@ jobs:
9158
- name: Publish release
9259
uses: ./.github/actions/publish-release
9360
with:
94-
tag: ${{ github.ref }}
95-
# - name: Download JDKs for the installers
96-
# run: bash download-jdks.sh
97-
# working-directory: installers
98-
# - name: Build the installers
99-
# run: bash build-installers.sh ${{ github.ref_name }} headless
100-
# working-directory: installers
101-
# - name: Create Release
102-
# uses: softprops/action-gh-release@v1
103-
#
104-
# with:
105-
# files: |
106-
# dist/jmonkeyplatform*.*
107-
# dist/jmonkeyengine-sdk*.*
108-
# dist/jMonkeyEngine-SDK*.*
109-
# tag_name: ${{ github.ref }}
110-
# name: Release ${{ github.ref }}
111-
# env:
112-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
61+
tag: ${{ github.ref }}

installers/build-installers.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ function build_linux_deb {
3131

3232
function build_windows_installer {
3333
echo "> Building the Windows installer"
34-
35-
setup_inno_setup
34+
35+
# Innosetup comes readily installed on GitHub, and either way maybe better to use its package manager to get it
36+
if [ -n "$3" ];
37+
then
38+
setup_inno_setup
39+
fi
3640

3741
build_nbpackage windows "$2" jmonkeyengine-windows-"$2".properties "$1"
3842

@@ -43,7 +47,7 @@ function setup_inno_setup {
4347
echo ">> Setting up Inno Setup"
4448

4549
download_inno_setup
46-
downloads/innosetup.exe /VERYSILENT
50+
./downloads/innosetup.exe /VERYSILENT
4751

4852
echo "<< OK!"
4953
}
@@ -93,7 +97,7 @@ case "$arch_raw" in
9397
esac
9498

9599
case "$2" in
96-
Windows) build_windows_installer "$versionString" "$arch" ;;
100+
Windows) build_windows_installer "$versionString" "$arch" "$4" ;;
97101
Linux) build_linux_deb "$versionString" "$arch" ;;
98102
macOS) build_macos_pgk "$versionString" "$arch" ;;
99103
*)

0 commit comments

Comments
 (0)