Uh oh!
There was an error while loading. Please reload this page.
build(shared-core): publish the XCFramework to flipcash-shared-core-spm - #1294
Merged
Conversation
Point both halves of the KMMBridge publish at code-payments/flipcash-shared-core-spm: the XCFramework zip is uploaded as a release asset there, and the generated Package.swift is written into a checkout of it rather than this repo's root. iOS then depends on a small public package instead of the whole Android app. Add the workflow that cuts a release: it builds on macOS (Apple targets and `swift package compute-checksum` both need Xcode), runs kmmBridgePublish, then commits Package.swift and moves the version tag onto that commit — the release upload creates the tag against the previous state, so leaving it there would resolve the version to the previous binary. Publishing needs SHARED_CORE_PUBLISH_TOKEN: a fine-grained PAT with Contents: read & write on the package repo. The job's own GITHUB_TOKEN cannot reach another repository, and a deploy key can push git but cannot create the release the binary is uploaded to.
Uh oh!
There was an error while loading. Please reload this page.
bmc08gt added a commit
that referenced
this pull request
Aug 21, 2026
…esign * origin/code/cash: fix(core): add \ to escape ' in What's (#1298) feat(shared-core): wrap the framework in a Swift target (#1297) chore: update display name entry title/hint (#1296) ci(shared-core): write a placeholder local.properties before publishing (#1295) build(shared-core): publish the XCFramework to flipcash-shared-core-spm (#1294) refactor(build-logic): extract the KMP test-fixture generator into a convention plugin (#1293) build(base58): declare the base58 lint tasks' dependency on generated fixtures (#1292) test(base58): run the vector gate on Kotlin/Native, not just the JVM (#1289) build(codes): declare the kikcode lint tasks' dependency on generated fixtures (#1288) # Conflicts: # apps/flipcash/core/src/main/res/values/strings.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Points the
:kmp:shared-coreKMMBridge publish atcode-payments/flipcash-shared-core-spm
so iOS can depend on a small public Swift Package instead of this repo.
Both halves move:
gitHubReleaseArtifacts(repository = …)uploads theSharedCore.xcframework.zipas a release asset there, andspm(spmDirectory = …)writes the generated
Package.swiftinto a checkout of it rather than this repo'sroot (its default).
versionand the package directory now come from-PsharedCoreVersion/-PspmRepoDir, with the directory falling back to the rootbuild dir so
spmDevBuildhas somewhere to write locally without dirtying the tree.Adds
Publish SharedCore, aworkflow_dispatchlane that takes the version to cut.It runs on macOS — Apple targets and
swift package compute-checksumboth needXcode, so it can't share the Ubuntu runners the rest of CI uses.
Two things worth knowing about the workflow:
setupDeployKeyshelper,but a deploy key can only push git — it can't create the GitHub release the binary
is uploaded to — and the job's own
GITHUB_TOKENcan't reach another repository atall. One fine-grained PAT with Contents: read & write on the package repo covers
both halves.
mainas it was before thePackage.swiftcommit exists. Left there, SPM wouldresolve the new version to the previous binary, so the last step re-tags onto the
commit that actually references the new asset.
Before the first publish
Add
SHARED_CORE_PUBLISH_TOKENto this repo's Actions secrets: a fine-grained PATwith Contents: read & write on
code-payments/flipcash-shared-core-spm. The packagerepo is already seeded and public, so consumers need no auth of their own.
The package, product, and framework are all named
SharedCoreregardless of therepository name, so iOS consumes it as
.package(url: "https://github.com/code-payments/flipcash-shared-core-spm", from: "…")and
import SharedCore.