This commit is contained in:
Anthony Stirling 2024-12-12 23:40:49 +00:00
parent 446cedf26e
commit 2f23eb69c6
2 changed files with 12 additions and 6 deletions

View File

@ -54,11 +54,14 @@ jobs:
sudo apt-get install -y fakeroot rpm
# Get version number
- name: Get version number
id: versionNumber
run: echo "versionNumber=$(./gradlew printVersion --quiet | tail -1)" >> $GITHUB_OUTPUT
- name: Get version numbers
id: versions
run: |
echo "version=$(./gradlew printVersion --quiet | tail -1)" >> $GITHUB_OUTPUT
echo "macversion=$(./gradlew printMacVersion --quiet | tail -1)" >> $GITHUB_OUTPUT
shell: bash
# Build installer
- name: Build Installer
run: ./gradlew build jpackage --info
@ -69,11 +72,11 @@ jobs:
shell: bash
run: |
if [ "${{ matrix.os }}" = "windows-latest" ]; then
mv Stirling-PDF.exe "Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}-${{ matrix.platform }}.${{ matrix.ext }}"
mv "Stirling-PDF-${{ steps.versions.outputs.version }}.exe" "Stirling-PDF-${{ steps.versions.outputs.version }}-${{ matrix.platform }}.${{ matrix.ext }}"
elif [ "${{ matrix.os }}" = "macos-latest" ]; then
mv build/jpackage/Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}.dmg "Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}-${{ matrix.platform }}.${{ matrix.ext }}"
mv "Stirling-PDF-${{ steps.versions.outputs.macversion }}.dmg" "Stirling-PDF-${{ steps.versions.outputs.version }}-${{ matrix.platform }}.${{ matrix.ext }}"
else
mv build/jpackage/stirling-pdf_${{ steps.versionNumber.outputs.versionNumber }}-1_amd64.deb "Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}-${{ matrix.platform }}.${{ matrix.ext }}"
mv "stirlingpdf_${{ steps.versions.outputs.version }}-1_amd64.deb" "Stirling-PDF-${{ steps.versions.outputs.version }}-${{ matrix.platform }}.${{ matrix.ext }}"
fi
# Upload installer as artifact for testing

View File

@ -425,3 +425,6 @@ tasks.named("test") {
task printVersion {
println project.version
}
task printMacVersion {
println getMacVersion(project.version.toString())
}