Skip to content

Commit 93408b5

Browse files
committed
SignPath signing
1 parent 465254c commit 93408b5

File tree

2 files changed

+33
-8
lines changed

2 files changed

+33
-8
lines changed

.github/workflows/natives.yml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,36 @@ jobs:
7272
# tar.exe: Couldn't open ~/.gradle/caches/modules-2/modules-2.lock: Permission denied
7373
run: ./gradlew build-natives --no-daemon
7474

75-
- name: Sign Windows DLLs
76-
if: matrix.os == 'windows-latest'
77-
uses: skymatic/code-sign-action@v3
75+
- name: Upload unsigned Windows DLLs for signing by SignPath.org
76+
if: matrix.os == 'windows-latest' && github.repository == 'JFormDesigner/FlatLaf'
77+
id: windows-unsigned
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: FlatLaf-natives-windows-unsigned
81+
path: flatlaf-natives/flatlaf-natives-windows/build/lib/main/release/**/*.dll
82+
83+
- name: Sign Windows DLLs using SignPath.org
84+
if: matrix.os == 'windows-latest' && github.repository == 'JFormDesigner/FlatLaf'
85+
uses: signpath/github-action-submit-signing-request@v2
7886
with:
79-
certificate: '${{ secrets.CODE_SIGN_CERT_BASE64 }}'
80-
password: '${{ secrets.CODE_SIGN_CERT_PASSWORD }}'
81-
certificatesha1: '${{ secrets.CODE_SIGN_CERT_SHA1 }}'
82-
folder: 'flatlaf-core/src/main/resources/com/formdev/flatlaf/natives'
87+
api-token: ${{ secrets.SIGNPATH_API_TOKEN }}
88+
organization-id: ${{ secrets.SIGNPATH_ORGANIZATION_ID }}
89+
project-slug: FlatLaf
90+
signing-policy-slug: release-signing
91+
artifact-configuration-slug: windows-dlls
92+
github-artifact-id: ${{ steps.windows-unsigned.outputs.artifact-id }}
93+
wait-for-completion: true
94+
output-artifact-directory: flatlaf-natives/flatlaf-natives-windows/build/lib/signed
95+
96+
- name: Copy signed Windows DLLs to flatlaf-core
97+
if: matrix.os == 'windows-latest' && github.repository == 'JFormDesigner/FlatLaf'
98+
shell: bash
99+
run: |
100+
SRC=flatlaf-natives/flatlaf-natives-windows/build/lib/signed
101+
DEST=flatlaf-core/src/main/resources/com/formdev/flatlaf/natives
102+
cp $SRC/aarch64/flatlaf-natives-windows.dll $DEST/flatlaf-windows-arm64.dll
103+
cp $SRC/x86/flatlaf-natives-windows.dll $DEST/flatlaf-windows-x86.dll
104+
cp $SRC/x86-64/flatlaf-natives-windows.dll $DEST/flatlaf-windows-x86_64.dll
83105
84106
- name: Sign macOS natives
85107
if: matrix.os == 'DISABLED--macos-latest'
@@ -112,7 +134,7 @@ jobs:
112134
# cleanup
113135
security delete-keychain $KEYCHAIN_PATH
114136
115-
- name: Set artifacts pattern
137+
- name: Set artifacts pattern for upload step
116138
shell: bash
117139
run: |
118140
case ${{ matrix.os }} in

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ Otherwise, download `flatlaf-<version>.jar` here:
8080
[Native Libraries distribution](https://www.formdev.com/flatlaf/native-libraries/)
8181
for instructions on how to redistribute FlatLaf native libraries with your
8282
application.
83+
- Windows DLLs: Free code signing provided by
84+
[SignPath.io](https://about.signpath.io/), certificate by
85+
[SignPath Foundation](https://signpath.org/).
8386
- If repackaging FlatLaf (and other) JARs into a single fat/uber JAR:
8487
- add `Multi-Release: true` to `META-INF/MANIFEST.MF`
8588
- keep `META-INF/versions/` and `META-INF/services/` directories

0 commit comments

Comments
 (0)