Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,18 @@ jobs:
find build/jpackage -name "*.deb" -exec sh -c 'x="{}"; mv "$x" "${{ env.OUTPUT_FILE_NAME }}"' \;
echo "OUTPUT_FILE=$(realpath ${{ env.OUTPUT_FILE_NAME }})" >> $GITHUB_ENV

- name: Create Linux RPM installer (Fedora/RHEL)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y rpm
rm -rf build/jpackage
./gradlew --info --stacktrace jpackage -PinstallerType=rpm --rerun-tasks
RPM_FILE_NAME="fqlite-${{ needs.get-version.outputs.version }}-$(uname -m).rpm"
mv "$(find build/jpackage -name '*.rpm' | head -n1)" "$RPM_FILE_NAME"
echo "RPM_OUTPUT_FILE_NAME=$RPM_FILE_NAME" >> $GITHUB_ENV
echo "RPM_OUTPUT_FILE=$(realpath $RPM_FILE_NAME)" >> $GITHUB_ENV

- name: Create Windows installer
if: startsWith(matrix.os, 'windows')
run: |
Expand Down Expand Up @@ -297,6 +309,21 @@ jobs:
overwrite: true
retention-days: 14

- name: Generate RPM artifact attestation
if: startsWith(matrix.os, 'ubuntu')
uses: actions/attest-build-provenance@v2
with:
subject-path: "${{ env.RPM_OUTPUT_FILE }}"

- name: Upload RPM artifact
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v4
with:
name: "${{ env.RPM_OUTPUT_FILE_NAME }}"
path: "${{ env.RPM_OUTPUT_FILE }}"
overwrite: true
retention-days: 14

publish:
name: Publish release artefacts
runs-on: ubuntu-latest
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/build_secure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,18 @@ jobs:
find build/jpackage -name "*.deb" -exec sh -c 'x="{}"; mv "$x" "${{ env.OUTPUT_FILE_NAME }}"' \;
echo "OUTPUT_FILE=$(realpath ${{ env.OUTPUT_FILE_NAME }})" >> $GITHUB_ENV

- name: Create Linux RPM installer (Fedora/RHEL)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y rpm
rm -rf build/jpackage
./gradlew --info --stacktrace jpackage -PinstallerType=rpm --rerun-tasks
RPM_FILE_NAME="fqlite-${{ needs.get-version.outputs.version }}-$(uname -m).rpm"
mv "$(find build/jpackage -name '*.rpm' | head -n1)" "$RPM_FILE_NAME"
echo "RPM_OUTPUT_FILE_NAME=$RPM_FILE_NAME" >> $GITHUB_ENV
echo "RPM_OUTPUT_FILE=$(realpath $RPM_FILE_NAME)" >> $GITHUB_ENV

- name: Create Windows installer
if: startsWith(matrix.os, 'windows')
run: |
Expand Down Expand Up @@ -297,6 +309,21 @@ jobs:
overwrite: true
retention-days: 14

- name: Generate RPM artifact attestation
if: startsWith(matrix.os, 'ubuntu')
uses: actions/attest-build-provenance@v2
with:
subject-path: "${{ env.RPM_OUTPUT_FILE }}"

- name: Upload RPM artifact
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v4
with:
name: "${{ env.RPM_OUTPUT_FILE_NAME }}"
path: "${{ env.RPM_OUTPUT_FILE }}"
overwrite: true
retention-days: 14

publish:
name: Publish release artefacts
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,16 @@ runtime {
if (currentOs.windows) {
installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut']
} else if (currentOs.linux) {
// jpackage defaults to the native package type of the build host
// (deb on Ubuntu). Pass -PinstallerType=rpm to build an RPM for
// Fedora/RHEL instead (requires rpmbuild on the build machine).
if (project.hasProperty('installerType')) {
installerType = project.property('installerType')
}
installerOptions += ['--linux-package-name', 'fqlite', '--linux-shortcut']
if (project.findProperty('installerType') == 'rpm') {
installerOptions += ['--linux-rpm-license-type', 'ASL 2.0']
}
} else if (currentOs.isMacOsX()) {
imageOptions += ['--mac-package-name', 'fqlite']
skipInstaller = true
Expand Down