Skip to content

Update test-nuget-certificates.yml #14

Update test-nuget-certificates.yml

Update test-nuget-certificates.yml #14

name: Test Nuget Certificates
on:
push:
branches: [ '*' ]
tags: [ '*' ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
import-certificate:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- run: make install
- name: import-certificate
run: |
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.NUGET_CERTIFICATE }}'
certutil -decode certificate\certificate.txt certificate\certificate.pfx
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: certificate.pfx
path: certificate\certificate.pfx
retention-days: 1
# generate-certificate:
# runs-on: ubuntu-latest
# needs: [ import-certificate ]
# steps:
# - uses: actions/checkout@v2
# - run: make install
# - name: Download code signing certificate
# uses: actions/download-artifact@v3
# with:
# name: certificate.pfx
# - name: gen-certificate
# run: |
# openssl pkcs12 -in certificate.pfx -out certificate.pem
# openssl crl2pkcs7 -nocrl -certfile certificate.pem -out certificate.p7b -certfile CACert.cer
# openssl pkcs7 -print_certs -in certificate.p7b -out certificate\certificate.cer
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: certificate.cer
path: certificate\certificate.cer
retention-days: 1