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

Create PR when Application Services makes a release #8

Merged
merged 16 commits into from Oct 13, 2021
Merged

Conversation

tarikeshaq
Copy link
Member

Summary

  • Adds a Github action that does the following steps:

    • Checks out the repository
    • Sets up python
    • Sets up pyhon dependencies needed for the scripts
    • Gets the last application-services tag from Github
    • Checks if we already updated to the latest release, if so, none of the next steps will run
    • Sets up git commiter information
    • Updates the git submodule to be in-line with the release
    • Updates the Package.swift to have the latest xcframework and checksum
    • Installs Rust so it can be used in the make_tag script
    • installs swiftformat, its need to make sure the code generated is formated
    • runs the make_tag, this could be a no-op if no changes to the udls or uniffi happened, but if there were changes, it would generate any code that needs to be regenerated
    • opens a pull request!
  • Adds helper scripts:

    • a script that checks if we already updated is_already_updated.py
    • a script to read the latest tag read_as_tag.py
    • a script to update the Package.swift, update_package_swift.py

    The github action will run every five minutes of the 3pm UTC hour of each day (8am PST)
    (it's set to run every minute, but github limits it to every five minutes, we can change frequency if we'd like though!)

    some minor cleanups for me to do here and there in the scripts, but I ran it a bunch of times on my fork so I think it's tested enough

    Could be a good idea to merge this, see it in action with version 84.5.0 and iterate if that's buggy

@tarikeshaq tarikeshaq changed the title Auto release Create PR when Application Services makes a release Oct 7, 2021
Copy link
Member Author

@tarikeshaq tarikeshaq left a comment

Choose a reason for hiding this comment

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

Did a quick round of self-review, I'll address those tomorrow!

automation/read_as_tag.py Outdated Show resolved Hide resolved
automation/update_package_swift.py Outdated Show resolved Hide resolved
.github/workflows/update-as.yml Outdated Show resolved Hide resolved
.github/workflows/update-as.yml Outdated Show resolved Hide resolved
.github/workflows/update-as.yml Outdated Show resolved Hide resolved
automation/is_already_updated.py Outdated Show resolved Hide resolved
automation/update_package_swift.py Outdated Show resolved Hide resolved
.github/workflows/update-as.yml Outdated Show resolved Hide resolved
automation/update_package_swift.py Show resolved Hide resolved
Copy link
Contributor

@skhamis skhamis left a comment

Choose a reason for hiding this comment

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

Nice job on this! Will be exciting to get some automation in this repo. Once those nits are fixed, feel free to merge!

@tarikeshaq
Copy link
Member Author

eeeh minor issue I'll deal with next week (darn was hoping this merges today to see it in action): Looks like two of the github actions I use aren't allowed in mozilla repos, and prevent this CI from running 😢 (guess the rules are different for firefox-ios since there are under mozilla-mobile). It's the create-pr and install-swift-tools ones... Shouldn't be too much work to script what they do, I'll get to it early next week

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