Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Auto upload macOS/Linux releases to github #3351

Closed
wants to merge 1 commit into from

Conversation

cg2121
Copy link
Contributor

@cg2121 cg2121 commented Aug 28, 2020

Description

This automatically uploads releases when a new tag is published.

Motivation and Context

The release process needs to automated.

How Has This Been Tested?

Tested with CI on fork.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

@WizardCM
Copy link
Member

As with nightlies, these'd be unsigned (including the game capture DLLs). As we know, the macOS signing process is a lot of waiting and a bit of user input (purposefully not designed to be automated by Apple). I don't know the Windows signing well enough, but I assume that's best done manually too (after building?).

It's certainly possible to package the Windows build into an installer automatically, but that also depends on Jim's custom folder structure pre-package.

I personally think the PPA would be the best place to start automating on the CI, especially nightlies. That process is (from what I understand) pretty lengthy.

@WizardCM WizardCM added the Enhancement Improvement to existing functionality label Aug 28, 2020
@cg2121 cg2121 force-pushed the ci-release branch 5 times, most recently from b8f5250 to 773e657 Compare August 28, 2020 12:24
@PatTheMav
Copy link
Member

PatTheMav commented Aug 28, 2020

Signing for macOS can be fully automated if we feel comfortable uploading our macOS developer keys to CI as a secret (AES-encrypted BASE64-string that is decrypted with a key stored as another secret).

I've implemented this once for obs-websocket: https://github.com/PatTheMav/obs-websocket/blob/a479f529af1e5bf4214d39cec36fad6e6f101a14/.github/workflows/tag_release.yml#L395

On obs-deps I added it as a wholly separate step that always requires on the other build processes to finish successful and of course only trigger when a commit is tagged. I think that uploading the different release assets should be contained in that job and not added to the normal build jobs (also avoids having to check all those requirements for every event that's not a tag).

We might need to codesign all binaries on macOS even for nightlies anyway (requirement for Apple Silicon binaries on Big Sur) and notarization can be done on the final dmg image as part of the release step (the stapling is applied recursively). Might introduce a ~5 minute delay while xcnotary waits for the notarization ticket.

@RytoEX
Copy link
Member

RytoEX commented Aug 28, 2020

Signing for macOS can be fully automated if we feel comfortable uploading our macOS developer keys to CI as a secret (AES-encrypted BASE64-string that is decrypted with a key stored as another secret).

We used to do this. See the old macOS build/package/deploy scripts.

@cg2121 cg2121 force-pushed the ci-release branch 4 times, most recently from 62d459f to a8057b8 Compare August 31, 2020 20:09
@cg2121
Copy link
Contributor Author

cg2121 commented Aug 31, 2020

I've finally got it working properly.

@cg2121 cg2121 force-pushed the ci-release branch 2 times, most recently from 44909db to ce40ce3 Compare August 31, 2020 22:47
@PatTheMav
Copy link
Member

@cg2121 With #3444 and #3449 merged we have release-ready macOS builds created by CI now.

@cg2121 cg2121 force-pushed the ci-release branch 2 times, most recently from ee5ee4d to 0f3ba17 Compare November 27, 2020 09:52
@cg2121 cg2121 changed the title CI: Auto upload to GitHub when released CI: Auto upload Mac releases to GitHub Nov 27, 2020
@cg2121
Copy link
Contributor Author

cg2121 commented Nov 27, 2020

I've currently simplified this to only upload Mac releases, as it is the only OS with the full build process in the Git workflow.

Windows and Linux can be done at a different time when their builds are more automated.

@cg2121
Copy link
Contributor Author

cg2121 commented May 1, 2021

It is updated now to create the release in draft mode.

@jp9000
Copy link
Member

jp9000 commented May 1, 2021

There are some issues with this. First issue is that the file names are not going to be the desired filenames. For example, the 26.1.2 macOS release name was obs-mac-26.1.2.dmg. The filename that's generated by github on the other hand is mangled and has the commit hash in it. For example, 27 RC2 was 2021-04-12-dca1d3714-27.0.0-rc2-rel-macOS.dmg. This is generally not ideal as a release filename.

Another issue dodgepong pointed out is just wanting to get all three versions released at the same time so things are synchronized.

.github/workflows/main.yml Outdated Show resolved Hide resolved
@cg2121
Copy link
Contributor Author

cg2121 commented Mar 27, 2022

Reopened because the cmake rewrite is now merged.

Copy link
Member

@RytoEX RytoEX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a quick review. @PatTheMav ?

.github/workflows/main.yml Outdated Show resolved Hide resolved
@PatTheMav
Copy link
Member

I would like to see the checksums being generated and added to the release (see here: https://github.com/obsproject/obs-plugintemplate/blob/077615678bc8513ed34d9e3fd290abe56822615e/.github/workflows/main.yml#L349).

@cg2121
Copy link
Contributor Author

cg2121 commented Mar 28, 2022

I've have now added checksum generation.

@PatTheMav
Copy link
Member

Looks good to me.

@cg2121 cg2121 force-pushed the ci-release branch 2 times, most recently from 66b0a43 to 7b270f9 Compare March 28, 2022 22:35
@RytoEX RytoEX self-assigned this Apr 12, 2022
@RytoEX RytoEX added the CI label Jun 27, 2022
@cg2121 cg2121 marked this pull request as draft July 27, 2022 16:20
@cg2121
Copy link
Contributor Author

cg2121 commented Jul 27, 2022

Needs #6241 to be merged first, so marked this as draft for now.

@cg2121 cg2121 changed the title CI: Auto upload Mac releases to GitHub CI: Auto upload macOS/Linux releases to github Jul 27, 2022
@cg2121
Copy link
Contributor Author

cg2121 commented Jul 27, 2022

Updated to include Linux flatpak and deb

@RytoEX
Copy link
Member

RytoEX commented Aug 1, 2022

Now that #6241 has been merged, I'll need to see an example of this in action with current git before approving/merging.

When a tag is released, the workflow will automatically
create a release and upload the artifacts.
@cg2121
Copy link
Contributor Author

cg2121 commented Aug 2, 2022

After testing on my fork and fixing some issues, everything seems to be working great now.
Screenshot from 2022-08-01 23-33-51

@cg2121
Copy link
Contributor Author

cg2121 commented Jul 24, 2023

This has been added with 96a48e8

@cg2121 cg2121 closed this Jul 24, 2023
@cg2121 cg2121 deleted the ci-release branch July 24, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Enhancement Improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants