Skip to content

Commit 90029a1

Browse files
committed
Moved all the release pipeline to GitHub action. Added MSI and MSIX creation with code sign through Azure. Removed javafx .jar dependencies in release in favor of jdk+fx (a jdk with javafx modules)
1 parent 16a85fa commit 90029a1

File tree

65 files changed

+426
-134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+426
-134
lines changed

.github/workflows/build.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,41 @@ on: [push]
44

55
jobs:
66
build:
7-
runs-on: ubuntu-latest
7+
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
java: ['25']
11-
name: JDK ${{ matrix.java }}
10+
os: [ macos-latest, ubuntu-latest, macos-15-intel, windows-latest ]
11+
name: build ${{ matrix.os }}
1212

1313
steps:
1414
- uses: actions/checkout@v6
1515
- name: Set up JDK
1616
uses: actions/setup-java@v5
1717
with:
18-
java-version: ${{ matrix.java }}
18+
java-version: '25'
1919
distribution: 'liberica'
20+
java-package: 'jdk+fx'
2021
cache: 'maven'
21-
- run: sudo apt-get install xvfb
22-
- run: sudo apt-get install gettext
22+
- name: Install gettext and xvfb on Ubuntu
23+
if: matrix.os == 'ubuntu-latest'
24+
run: sudo apt-get update && sudo apt-get install -y gettext
25+
26+
- name: Build with Maven Ubuntu
27+
if: matrix.os == 'ubuntu-latest'
28+
run: xvfb-run mvn -Djava.awt.headless=true -Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.order=sw --batch-mode --update-snapshots verify
29+
30+
- name: Build with Maven MacOS intel
31+
if: matrix.os == 'macos-15-intel'
32+
run: mvn --batch-mode --update-snapshots -DskipTests verify
33+
34+
- name: Install scoop on Windows
35+
if: matrix.os == 'windows-latest'
36+
uses: MinoruSekine/setup-scoop@v4
37+
38+
- name: Install gettext on Windows
39+
if: matrix.os == 'windows-latest'
40+
run: scoop install gettext
41+
2342
- name: Build with Maven
24-
run: xvfb-run mvn -Djava.awt.headless=true -Dtestfx.robot=glass -Dtestfx.headless=true -Dprism.order=sw --batch-mode --update-snapshots verify
43+
if: matrix.os != 'ubuntu-latest' && matrix.os != 'macos-15-intel'
44+
run: mvn --batch-mode --update-snapshots verify

.github/workflows/release.yml

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ jobs:
1212
os_matrix:
1313
strategy:
1414
matrix:
15-
os: [ macos-latest, macos-15-intel, ubuntu-latest ]
15+
os: [ macos-latest, macos-15-intel, ubuntu-latest, windows-latest ]
1616
runs-on: ${{ matrix.os }}
1717
name: build ${{ matrix.os }}
1818
steps:
1919
- name: Checkout repo
2020
uses: actions/checkout@v6
2121
- name: Import GPG key
2222
id: import_gpg
23-
uses: crazy-max/ghaction-import-gpg@v6
23+
uses: crazy-max/ghaction-import-gpg@v7
2424
with:
2525
gpg_private_key: ${{ secrets.GPG_SUB_SECRET_KEY }}
2626
passphrase: ${{ secrets.GPG_SUB_SECRET_KEY_PASSWORD }}
@@ -36,18 +36,12 @@ jobs:
3636
with:
3737
java-version: 25
3838
distribution: 'liberica'
39+
java-package: 'jdk+fx'
40+
cache: 'maven'
3941
- name: Install gettext on Ubuntu
4042
if: matrix.os == 'ubuntu-latest'
4143
run: sudo apt-get update && sudo apt-get install -y gettext
4244

43-
- name: Install gettext on macOS
44-
if: matrix.os == 'macos-latest'
45-
run: brew install gettext
46-
47-
- name: Install gettext on macOS Intel
48-
if: matrix.os == 'macos-15-intel'
49-
run: brew install gettext
50-
5145
- name: Install scoop on Windows
5246
if: matrix.os == 'windows-latest'
5347
uses: MinoruSekine/setup-scoop@v4
@@ -56,12 +50,42 @@ jobs:
5650
if: matrix.os == 'windows-latest'
5751
run: scoop install gettext
5852

53+
- name: Add Windows SDK tools to PATH
54+
if: matrix.os == 'windows-latest'
55+
shell: pwsh
56+
run: |
57+
$sdkBin = Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin" -Directory |
58+
Where-Object { $_.Name -match "^\d" } | Sort-Object Name -Descending | Select-Object -First 1
59+
$x64 = Join-Path $sdkBin.FullName "x64"
60+
echo $x64 >> $env:GITHUB_PATH
61+
62+
- name: Setup Azure Trusted Signing dlib on Windows
63+
if: matrix.os == 'windows-latest'
64+
shell: pwsh
65+
run: |
66+
$pkg = "Microsoft.Trusted.Signing.Client"
67+
$version = "1.0.60"
68+
nuget install $pkg -Version $version -OutputDirectory "$env:RUNNER_TEMP\nuget" -NonInteractive
69+
$dlib = Get-ChildItem "$env:RUNNER_TEMP\nuget\$pkg.$version" -Recurse -Filter "Azure.CodeSigning.Dlib.dll" |
70+
Where-Object { $_.FullName -match "x64" } | Select-Object -First 1
71+
echo "AZURE_CODESIGNING_DLIB=$($dlib.FullName)" >> $env:GITHUB_ENV
72+
73+
- name: Create signing metadata file on Windows
74+
if: matrix.os == 'windows-latest'
75+
shell: bash
76+
run: |
77+
echo '${{ secrets.AZURE_SIGNING_METADATA_JSON }}' > $RUNNER_TEMP/signing-metadata.json
78+
echo "AZURE_SIGNING_METADATA=$RUNNER_TEMP/signing-metadata.json" >> $GITHUB_ENV
79+
5980
- name: Build
6081
env:
6182
APPLEID: ${{ secrets.NOTARIZE_ACCOUNT }}
6283
APPLEIDPASS: ${{ secrets.NOTERIZE_PWD }}
6384
TEAMID: ${{ secrets.NOTERIZE_TEAM_ID }}
6485
PDFSAM_GPG_FINGERPRINT: ${{ secrets.GPG_SUB_FINGERPRINT }}
86+
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
87+
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
88+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
6589
run: mvn clean install -DskipTests -Drelease --batch-mode
6690
- name: Release
6791
uses: softprops/action-gh-release@v2
@@ -71,9 +95,13 @@ jobs:
7195
pdfsam-basic/target/*.deb
7296
pdfsam-basic/target/*.dmg
7397
pdfsam-basic/target/*.zip
98+
pdfsam-basic/target/*.msi
99+
pdfsam-basic/target/*.msix
74100
pdfsam-basic/target/*.tar.gz
75101
pdfsam-basic/target/*.deb.asc
76102
pdfsam-basic/target/*.dmg.asc
77103
pdfsam-basic/target/*.zip.asc
104+
pdfsam-basic/target/*.msi.asc
105+
pdfsam-basic/target/*.msix.asc
78106
pdfsam-basic/target/*.tar.gz.asc
79107

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ target/
1717
.idea/
1818
/.run/
1919
.claude/
20+
.env

pdfsam-basic/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
/target/
2+
**/signing-metadata.json

0 commit comments

Comments
 (0)