kevoreilly / capemon

capemon: CAPE's monitor
GNU General Public License v3.0
102 stars 49 forks source link

ci: push changes to capev2 repository #43

Closed TheMythologist closed 2 years ago

TheMythologist commented 2 years ago

CI changes to msbuild:

1) Build capemon on x64 and x86 windows systems 2) Pushes the built capemon.dll and capemon_x64.dll to artifacts 3) Download the artifacts 4) Upload them to github releases of this repository 5) Push the new DLLs to CAPEv2 repository

What you need to do @kevoreilly:

Setup SSH deploy key

Generate the key files

  • ssh-keygen -t ed25519 -C "your_email@example.com" (the type ed25519 is recommended by GitHub documentation)
  • ssh will ask for a file path: Enter file in which to save the key: write a new file name. I suggest the default directory and as a filename: id_github_name_of_your_repository to avoid overwriting a previous file. If you will be using this action for multiple repositories, you might want to generate different keys for each one.
  • Leave the passphrase empty (otherwise we would need to pass the passphrase to the GitHub Action)

    Set up the deployment key

    Destination repository

  • Go to the GitHub page of the destination repository
  • Click on "Settings" (settings for the repository, not the account settings)
  • On the left-hand side pane click on "Deploy keys"
  • Click on "Add deploy key"
  • Title: "GitHub Action push to another repository"
  • Key: paste the contents of the file with the public key. This was generated in the "Generate the key files" step and the name is "id_github_name_of_your_repository.pub"
  • Enable "Allow write access"barbar

    Origin repository

  • Go to the GitHub page of the origin repository
  • On the left-hand side pane click on "Secrets" and then on "Actions"
  • Click on "New repository secret"
  • Name: "SSH_DEPLOY_KEY"
  • Value: paste the contents of the file with the private key. This was generated in the "Generate the key files" step and the name is "id_github_name_of_your_repository"
TheMythologist commented 2 years ago

@kevoreilly Could you enable running workflow for this PR so I can see if it achieves what we want thanks :)

kevoreilly commented 2 years ago

Running...

TheMythologist commented 2 years ago

Ready to be merged, let me know if you need me to change anything

kevoreilly commented 2 years ago

Not sure this is working...

publishToo many retries.

build (x64, x64)No files were found with the provided path: D:\a\capemon\capemon\Release\capemon.dll. No artifacts will be uploaded. build (x86, Win32)No files were found with the provided path: D:\a\capemon\capemon\x64\Release\capemon_x64.dll. No artifacts will be uploaded.

Too many retries. build (x64, x64) No files were found with the provided path: D:\a\capemon\capemon\Release\capemon.dll. No artifacts will be uploaded. build (x86, Win32) No files were found with the provided path: D:\a\capemon\capemon\x64\Release\capemon_x64.dll. No artifacts will be uploaded.

TheMythologist commented 2 years ago

:( I'll look into it

TheMythologist commented 2 years ago

Oh the "No files were found" is expected, but what isn't working is https://github.com/kevoreilly/capemon/runs/7009180324?check_suite_focus=true

TheMythologist commented 2 years ago

Did you allow Github releases for this repository?

TheMythologist commented 2 years ago

Found the source of the error, check out #44 😃

r0ny123 commented 2 years ago

Thanks for the fix @TheMythologist and @Kevoreilly did you set up the ssh keys as mentioned in https://github.com/kevoreilly/capemon/pull/43#issue-1272449889 cause the latest capemon DLLs are not getting pushed to CAPEv2 repo.