-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement release process in fastlane #68
Conversation
…kage Make it easier to programmatically change rust library version
@crazytonyli We don't need to use |
@oguzkocer If I understand it correctly, that plugin is called via gradle command inside a "build tags" CI step. Since we have to have a special release process here to create a tag for us, I wonder if we should just call gradle from the fastlane file? Adding a CI stpe to publish Android artifacts certainly would work, but I thought it might be nice to have all release steps done in one place, rather than half in fastlane (creating a tag and Swift things) and the other half in a standalone CI step (Android things). |
I am not sure if Android publishing would even work the way we want using We have a I don't usually share strong opinions, but let's please not overcomplicate things and follow the same approach every other Android library uses. |
I totally overlooked publishing Swift and Android in one step wouldn't even work, because we don't have a mac agent that has Android tooling installed. So we'll have to release them separately. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generally looks solid – to ensure we haven't missed anything, could you run it and tag a test release that we can validate?
@jkmassel Absolutely. I'll make some pipeline changes, so that we can publish both Swift and Kotline libraries in one release. Regarding validating the release, we can validate the released Kotlin libraries in an empty Android project. But we won't be able to use the Swift package until this repository becomes public (due to the xcframework URL). |
As previously mentioned, Kotlin & Android modules get published for every PR, every commit in
This is also done for Android artifacts here. |
@oguzkocer Nice. I didn't notice that those steps were already added to the pipeline 👍 |
We need a special release process for the Swift package. Because we can't publish a new release after creating a tag like other libraries. We need to package the Rust library into xcframework prior to creating a tag.
Package.swift uses the Rust library via a local xcframework, which is not included in the git repo and is only produced by running
make xcframework
locally. That works fine during development. But once the Swift package is released, SPM will need to checkout a specific version git tag whose Package.swift should not refer to a local xcframework because SPM can't run the make command for us.In order for SPM to work out of the box, we'll need to pre-built the xcframework before creating a git tag. Here are the detailed process:
This PR implements these steps in fastlane:
bundle exec fastlane release version:<new-version-number>
. Please note, publishing a new version of Android library is not implemented at the moment. @oguzkocer I may need you to help fill in the blank here (see the fastlanerelease
lane).I also added a new release pipeline to CI, so that we can publish new releases via CI. Here is a test run to publish a new version 0.0.1. The build failed because the GitHub token doesn't have permission to create a tag. This new pipeline is not included in this PR. We can sort it out later if needed.
Test Instructions
If you want to test publishing new releases without pushing them into this repository, you can fork this repo into your own account and tests with your own repo. Once the repo is forked, update
GITHUB_REPO
andGIT_REMOTE_NAME
accordingly. Runbundle exec fastlane release version:0.0.1
.Or, you can just test with this repo with the same command without changing any code. Remember to delete the new tags and releases after tests are completed.