Skip to content

Commit 069a58c

Browse files
committed
Add code-signing release
1 parent e4bdb78 commit 069a58c

1 file changed

Lines changed: 24 additions & 8 deletions

File tree

.github/workflows/release.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
name: release
22
on:
33
workflow_dispatch:
4+
inputs:
5+
signed_binary_name:
6+
description: 'Name of the signed binary'
7+
required: false
8+
default: 'spiceai.signed.taco'
9+
type: string
410
release:
511
types: [created]
12+
613
jobs:
714
build:
8-
runs-on: macos-latest
15+
runs-on: code-signing
16+
if: github.event.action == 'created' && github.event.release.prerelease == true
917
steps:
1018
- name: Checkout
1119
uses: actions/checkout@v4
@@ -17,20 +25,28 @@ jobs:
1725
with:
1826
python-version: 3.13
1927

20-
- name: Install Make
28+
- name: Make Package (unsigned)
2129
run: |
22-
brew install make
30+
make package
2331
24-
- name: Package (unsigned)
32+
- name: Set up Java for signing
33+
uses: actions/setup-java@v4
34+
with:
35+
java-version: '11'
36+
distribution: 'zulu'
37+
38+
- name: Sign ${{ inputs.signed_binary_name}}
39+
env:
40+
DIGICERT_KEY_ALIAS: ${{ secrets.DIGICERT_KEY_ALIAS }}
2541
run: |
26-
make package
27-
mv spice.taco spice_unsigned.taco
42+
jarsigner -tsa http://timestamp.digicert.com -verbose -keystore NONE -storetype PKCS11 -providerClass sun.security.pkcs11.SunPKCS11 -providerArg pkcs11properties.cfg -sigalg SHA256withRSA -signedjar ${{ inputs.signed_binary_name}} ../../spice.taco $DIGICERT_KEY_ALIAS
43+
shell: bash
2844

29-
- name: Upload
45+
- name: Upload to release
3046
uses: softprops/action-gh-release@v2
3147
if: startsWith(github.ref, 'refs/tags/')
3248
with:
3349
draft: true
3450
prerelease: true
3551
fail_on_unmatched_files: true
36-
files: spice_unsigned.taco
52+
files: ${{ inputs.signed_binary_name }}

0 commit comments

Comments
 (0)