Closed medallyon closed 2 years ago
You want to export the pfx file as a base64 string, then put that string into a GitHub Actions secret.
In the workflow, there is a step that loads the base64 string and saves it as a that file you're referring to.
Never commit the file with your code (even in a private repo)! It is something you do not want anyone to have because it contains the private key of your code signing certificate.
Here is the exact line that loads up the base 64 from the secret https://github.com/microsoft/github-actions-for-desktop-apps/blob/lance/net6-update/.github/workflows/cd-net6-temp.yml#L124
If you want to see a simpler version of such a workflow, here's another one you can look at https://github.com/LanceMcCarthy/MediaFileManager/blob/7791c69edbfe730e409a7158ab3fcd44ff7ac218/.github/workflows/cd_release_sideload.yml#L124
If you do not need to sign the package (you're only trying to do a build without packaging), then you can look at this workflow as a guide https://github.com/LanceMcCarthy/MediaFileManager/blob/main/.github/workflows/ci_main.yml
If you do not need to sign, but still want to create a msixbundle for the Microsoft Store, use this one https://github.com/LanceMcCarthy/MediaFileManager/blob/main/.github/workflows/cd_release_msstore.yml
I've been figuring this workflow out for hours. My current roadblock is to do with supplying the
msbuild
command with the correct PFX. I used the provided template and followed the instructions to a tee.It appears that
msbuild
is trying to find the locally generated certificate, the one that is generated through the Project Properties, but is not committed (I conveniently named itGitHubActionsWorkflow.pfx
). For some reason, it's not picking up the supplied file along with the supplied secret key.I tried un-checking the
Sign the Assembly
option and it successfully built the solution. However, attempting to runinstall.ps1
resulted in the following:Am I supposed to un-check the
Sign the Assembly
option after uploading my encoded certificate? If so, what use does supplyingmsbuild
with a decoded certificate file have if the assembly is not signed? And, most importantly, how do I fix this?