Skip to content

Commit fc55ef6

Browse files
committed
SignPath signing
(cherry picked from commit 93408b5)
1 parent a30105c commit fc55ef6

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

.github/workflows/natives.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,39 @@ 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: false
77-
# if: matrix.os == 'windows-latest'
78-
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
7986
with:
80-
certificate: '${{ secrets.CODE_SIGN_CERT_BASE64 }}'
81-
password: '${{ secrets.CODE_SIGN_CERT_PASSWORD }}'
82-
certificatesha1: '${{ secrets.CODE_SIGN_CERT_SHA1 }}'
83-
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
84105
85106
- name: Sign macOS natives
86-
if: false
87-
# if: matrix.os == 'DISABLED--macos-latest'
107+
if: matrix.os == 'DISABLED--macos-latest'
88108
env:
89109
CERT_BASE64: ${{ secrets.CODE_SIGN_CERT_BASE64 }}
90110
CERT_PASSWORD: ${{ secrets.CODE_SIGN_CERT_PASSWORD }}
@@ -114,7 +134,7 @@ jobs:
114134
# cleanup
115135
security delete-keychain $KEYCHAIN_PATH
116136
117-
- name: Set artifacts pattern
137+
- name: Set artifacts pattern for upload step
118138
shell: bash
119139
run: |
120140
case ${{ matrix.os }} in

0 commit comments

Comments
 (0)