working on win32 signature #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Get Certificate | |
env: | |
COSIGN_EXPERIMENTAL: "true" | |
COSIGN_YES: "true" | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- name: Install cosign | |
uses: sigstore/cosign-installer@main | |
- name: Sign the executable | |
run: | |
touch dummy.txt | |
&& cosign generate-key-pair | |
&& cosign sign-blob dummy.txt --yes --output-certificate cosign.crt.base64 --output-signature cosign.sig | |
&& base64 --decode cosign.crt.base64 > cosign.crt | |
&& openssl x509 -in cosign.crt -out cosign.pem | |
&& openssl x509 -text -noout -in cosign.pem | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml | |
settings-path: ${{ github.workspace }} # location for the settings.xml file | |
- name: Create Java Keystore | |
run: | |
keytool -importcert -alias cosign -file cosign.pem -keystore cosign.jks -storepass cosign -noprompt | |
&& keytool -v -list -keystore cosign.jks -storepass cosign -noprompt | |
- name: Show signed artefacts details | |
run: pwd && ls -lisa |