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

Add GitHub Actions Workflow #28

Open
rgl opened this issue Oct 15, 2023 · 4 comments
Open

Add GitHub Actions Workflow #28

rgl opened this issue Oct 15, 2023 · 4 comments

Comments

@rgl
Copy link

rgl commented Oct 15, 2023

Does it make sense to add a GitHub Actions Workflow? It could:

  • build and test this repository code after each git push
  • automatically publish the package to Flathub after a git tag is pushed
@nokyan
Copy link
Owner

nokyan commented Oct 15, 2023

Hi!
It certainly would make sense! Though if I'm being honest, I've never really worked with GitHub Actions, so I'd have to do some research on that. 😅

@rgl
Copy link
Author

rgl commented Oct 15, 2023

I can help with that!

How are you currently publishing to Flathub (I never did this before)? It seems there's https://github.com/flathub/net.nokyan.Resources and an associated CI at https://buildbot.flathub.org/#/builders/19/builds/9067. Can you explain how does that work?

@nokyan
Copy link
Owner

nokyan commented Oct 16, 2023

Thank you for offering your help!

My current workflow looks like this:

  • Publish a new release on this repo with a git tag such as v1.1.0
  • Use the flatpak-cargo-generator to generate generated-sources.json, which contains all the Rust dependencies. That way they are downloaded by the Buildbot itself before cargo tries to do so because the Buildbot does not allow arbitrary access to the internet while building
  • Change the Flatpak manifest to update the commit and tag properties for the new update in a new branch in the Flathub repo
  • (Test the build locally to see if everything properly deployed and installed as a Flatpak works)
  • Open a pull request such as Update to 1.1.0 and remove GLib patch flathub/net.nokyan.Resources#2
  • This pull request will cause the Flathub Buildbot to automatically build against the updated Flatpak manifest. If this build succeeds, the pull request may be merged
  • Once the pull request is merged, the Buildbot will build it again (most likely it's not a complete rebuild since the last commit to the pull request before merge has to lead to a successful build) and publish that build to Flathub after 3 hours if I don't publish it manually earlier.

There is also this related to Flathub and GitHub Action: https://github.com/flatpak/flatpak-github-actions
At the moment it's quite manual, but as I hope not to have to make new releases too often, I'm fine with what it is at the moment, so there's no need to rush :)

@rgl
Copy link
Author

rgl commented Oct 16, 2023

Thank You for the details! I think I have everything needed to start cracking all those steps, one at a time :-)

BTW, I'm using this as a learning exercise about Rust, Flatpak, and Flatpak distribution/publication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants