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

Streamline Release Process #1247

Open
art-divin opened this issue Dec 26, 2023 · 3 comments
Open

Streamline Release Process #1247

art-divin opened this issue Dec 26, 2023 · 3 comments
Assignees
Labels
automated release Tasks related to release process automation

Comments

@art-divin
Copy link
Collaborator

art-divin commented Dec 26, 2023

Context

Current release process should be 100% automated via GH actions.

For this, automatic code generation, documentation and other steps need to be:

  1. updated for Linux support (Linux Support: from experimental to 100% 🚀 #1198)
  2. moved from ruby to GH actions

Additionally, releases to cocoapods and homebrew should also have separate GH actions or bound to existing release-related ones, to be fully automated.
Currently, releasing Sourcery takes about an hour of:

  1. Generating documentation
  2. Verifying that there's no duplicated documentation generated (for Linux copies of files)
  3. Updating and committing source code files with the newer version (updated automatically)
  4. Creating new tag
  5. Deconstructing artifactbundle to preserve the correct location of /bin/sourcery (see Malformed artifactBundle #1216)
  6. Uploading zipped archive to new release's page on GH
  7. Booting into Linux VM and running swift build -c release —disable-sandbox —build-path build/
  8. Creating artifactbundle manually based on macOS version
  9. Uploading zipped files to GH release page
  10. Submitting the release

All these tasks need to be re-evaluated, and streamlined in order to fully automate releases based on new tag creation, for example, directly in GH.

@art-divin art-divin added the automated release Tasks related to release process automation label Dec 26, 2023
@art-divin art-divin self-assigned this Jan 10, 2024
@art-divin art-divin added this to the Release Automation milestone Jan 10, 2024
@art-divin
Copy link
Collaborator Author

art-divin commented Jan 15, 2024

After #1254, the following is the current release process:

  1. (Manual) Make sure that CHANGELOG.md has all entries for the new version
  2. (Manual) execute bundle install && rake release:update_metadata and after checking what was changed, commit
  3. (Manual) execute rake generate_internal_boilerplate_code and after checking what was changed, commit
  4. (Manual) Push changes to master branch
  5. (Manual) Create new draft release in https://github.com/krzysztofzablocki/Sourcery/releases
  6. (Manual) Wait for Docs GitHub Action to push changes to master branch after Step #4
  7. (Manual) Create new tag for the new version and push the tag separately from the release draft
  8. (Manual) Generate release notes using GItHub release page feature
  9. Wait for completion of release_macOS and release_ubuntu actions
    9.1 (Manual) download macOS artifacts, unzip them, re-zip using zip -r -X <target.zip> . from inside sourcery-x.y.z folder - this is due to "double zip" in GH action
    9.2 (Manual) download ubuntu artifact, simply unarchive it and re-archive using tar -zcvf <target> sourcery. Note: for convenience, .zip is not mentioned even though it is a zip archive behind the scenes, rather tar.xz extension is used
  10. (Manual) attach artifacts to the drafted release
  11. (Manual) make the release from Draft to public on GitHub
  12. (Manual) run rake release:cocoapods to upload new version to cocoapods (only available to core team members). Note: Make sure that you have installed iOS, tvOS and watchOS simulators in your current Xcode.
  13. Done! ✅

ℹ️ brew formula is updated automatically by BrewTestBot.

@art-divin
Copy link
Collaborator Author

⚠️ For some reason, workflow_run is not triggered when a new tag is created. So, GitHub actions need to be triggered manually, from a Pull Request with a hardcoded version.

I'll try fixing it later on.

@art-divin
Copy link
Collaborator Author

Replaced workflow_run with multi-job definition, 2.1.4 is being build after tag was created. ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automated release Tasks related to release process automation
Projects
None yet
Development

No branches or pull requests

1 participant