Hello! We are trying to modify our Github action w...
# touchlab-tools
m
Hello! We are trying to modify our Github action workflow that publishes an XCFramework using KMMBridge to use a Git tag to build the version instead of using the
gradle.properties
file as suggested in the docs. So far we can see the tag being properly used and populated everywhere, however, on the latest step
touchlab/ga-update-release-tag@v1
we are getting the following error:
Copy code
Run touchlab/ga-update-release-tag@v1
Error: From <https://github.com/xxxxxx/xxxxx-kmp>
 * [new tag]         0.0.52     -> 0.0.52
You are not currently on a branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>
Attaching our github action yml file to see if it helps 🙏
This does not happen when publishing the Android library, as that pipeline does not include the
touchlab/ga-update-release-tag@v1
step
k
If you're publishing to GitHub releases you can't really use a tag to publish, as GitHub releases are attached to tags. There's probably a way you could write that to work, but it would be ugly. KMMBridge is creating the tag when it creates a release. If you are using GitHub Packages, you wouldn't have the release creation problem. However, you'd still need to update the tag, because the release process involves updating the
Package.swift
file. In summary, SPM uses git tags, and GitHub releases are tied to tags, so using git tags to trigger releases will be complex. The model KMMBridge, and more specifically, the KMMBridge GitHub integration and sample workflows, use is to let GitHub Actions tag the release rather than the other way around. Again, I'm sure there's a way to do it, but you'll need to edit the GitHub Actions workflow and (probably) the actions themselves to support what you want to do.