diff --git a/.github/workflows/build-win32.yml b/.github/workflows/build-win32.yml index 66c1b97..22ad121 100644 --- a/.github/workflows/build-win32.yml +++ b/.github/workflows/build-win32.yml @@ -47,6 +47,13 @@ jobs: run: | $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.WINDOWS_CERTIFICATE }}") [System.IO.File]::WriteAllBytes("${{ github.workspace }}\cert.pfx", $pfx_cert_byte) + - name: Extract public certificate + shell: pwsh + env: + CERT_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} + run: | + $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("${{ github.workspace }}\cert.pfx", "$env:CERT_PASSWORD") + [System.IO.File]::WriteAllBytes("${{ github.workspace }}\3proxy.crt", $cert.Export("Cert")) - name: Sign shell: pwsh run: | @@ -83,6 +90,7 @@ jobs: copy authors dist\3proxy\ copy README.md dist\3proxy\ copy rus.3ps dist\3proxy\ + copy 3proxy.crt dist\3proxy\ - name: Get artifact uses: actions/upload-artifact@v7 with: diff --git a/.github/workflows/build-win64.yml b/.github/workflows/build-win64.yml index 55c7e50..84ee682 100644 --- a/.github/workflows/build-win64.yml +++ b/.github/workflows/build-win64.yml @@ -48,6 +48,13 @@ jobs: run: | $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.WINDOWS_CERTIFICATE }}") [System.IO.File]::WriteAllBytes("${{ github.workspace }}\cert.pfx", $pfx_cert_byte) + - name: Extract public certificate + shell: pwsh + env: + CERT_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} + run: | + $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("${{ github.workspace }}\cert.pfx", "$env:CERT_PASSWORD") + [System.IO.File]::WriteAllBytes("${{ github.workspace }}\3proxy.crt", $cert.Export("Cert")) - name: Sign shell: pwsh run: | @@ -84,6 +91,7 @@ jobs: copy authors dist\3proxy\ copy README.md dist\3proxy\ copy rus.3ps dist\3proxy\ + copy 3proxy.crt dist\3proxy\ - name: Get artifact uses: actions/upload-artifact@v7 with: diff --git a/.github/workflows/build-winarm64.yml b/.github/workflows/build-winarm64.yml index b37faf2..e5a940d 100644 --- a/.github/workflows/build-winarm64.yml +++ b/.github/workflows/build-winarm64.yml @@ -47,6 +47,13 @@ jobs: run: | $pfx_cert_byte = [System.Convert]::FromBase64String("${{ secrets.WINDOWS_CERTIFICATE }}") [System.IO.File]::WriteAllBytes("${{ github.workspace }}\cert.pfx", $pfx_cert_byte) + - name: Extract public certificate + shell: pwsh + env: + CERT_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }} + run: | + $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("${{ github.workspace }}\cert.pfx", "$env:CERT_PASSWORD") + [System.IO.File]::WriteAllBytes("${{ github.workspace }}\3proxy.crt", $cert.Export("Cert")) - name: Sign shell: pwsh run: | @@ -83,6 +90,7 @@ jobs: copy authors dist\3proxy\ copy README.md dist\3proxy\ copy rus.3ps dist\3proxy\ + copy 3proxy.crt dist\3proxy\ - name: Get artifact uses: actions/upload-artifact@v7 with: