Skip to content

Fix uniffi release: publish directly via knope, react on the release event - #1256

Merged
pblazej merged 2 commits into
mainfrom
blaze/fix-uniffi-trigger
Jul 30, 2026
Merged

Fix uniffi release: publish directly via knope, react on the release event#1256
pblazej merged 2 commits into
mainfrom
blaze/fix-uniffi-trigger

Conversation

@pblazej

@pblazej pblazej commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Every livekit-uniffi release has stranded (v0.1.2v0.1.5 are unpublished drafts with no tags): the assets = "marker" draft was never published by CI, and the one-shot draft lookup also raced Knope's creation. Since the Dart/Flutter cdylibs — the only asset the GH release ever hosted — are experimental and deferred, the release no longer needs to stage assets, so this drops the marker and lets Knope publish the livekit-uniffi/v* release + tag directly (like every normal crate). uniffi-packages.yml now reacts to on: release: [published] (filtered to livekit-uniffi/v*) and publishes the Swift xcframework + Android AAR — no draft, no lookup/retry, no manual finalize. The release event fires only for genuine livekit-uniffi releases, so the "released this cycle" gate is free (same publish-directly spirit as the Node/npm flow; since Maven — unlike npm — can't dedupe versions, this event-gating replaces npm's implicit idempotency). ffi-builds.yml and its marker are left unchanged.

Note: on: release firing for a Knope-App-published release is expected (GitHub Apps trigger workflow events; knope-bot's merges already trigger push/pull_request here) but hasn't been exercised in this repo yet — workflow_dispatch is kept as a manual fallback, and it's worth confirming on the first release. The already-stranded drafts (v0.1.2v0.1.5) are left untouched (non-destructive); publish/clean them up manually as desired.

🤖 Generated with Claude Code

@pblazej
pblazej requested a review from ladvoc as a code owner July 15, 2026 07:54
devin-ai-integration[bot]

This comment was marked as resolved.

@pblazej

pblazej commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

@ladvoc feel free to close it, there must be some more elegant solution to both this and normal ffi

@pblazej
pblazej force-pushed the blaze/fix-uniffi-trigger branch from 92a5367 to 0e23a49 Compare July 16, 2026 09:11
@pblazej pblazej changed the title Fix uniffi release: run from release.yml and publish the draft Fix stranded uniffi/ffi draft releases: retry lookup + publish uniffi draft Jul 16, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@pblazej
pblazej force-pushed the blaze/fix-uniffi-trigger branch from 0e23a49 to fb9b719 Compare July 16, 2026 09:26
@pblazej pblazej changed the title Fix stranded uniffi/ffi draft releases: retry lookup + publish uniffi draft Fix uniffi release: publish the draft (version-exact, retried lookup) Jul 16, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@pblazej
pblazej force-pushed the blaze/fix-uniffi-trigger branch from fb9b719 to 0a4b678 Compare July 16, 2026 09:31
@pblazej
pblazej force-pushed the blaze/fix-uniffi-trigger branch from 0a4b678 to 60157e2 Compare July 27, 2026 11:35
@pblazej pblazej changed the title Fix uniffi release: publish the draft (version-exact, retried lookup) Fix uniffi release: publish the draft (Swift + Android; Flutter cdylibs deferred) Jul 27, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

…event

Every livekit-uniffi release stranded (v0.1.2-v0.1.5 are unpublished drafts,
no tags): the `assets = "marker"` draft was never published by CI, and the
one-shot draft lookup raced knope's creation.

Since the Dart/Flutter cdylibs (the only asset the GH release hosted) are
experimental and deferred, the release no longer needs to stage assets, so drop
the marker. knope now publishes the livekit-uniffi release + tag directly, like
every normal crate. uniffi-packages.yml reacts to `on: release: [published]`
(filtered to livekit-uniffi/v*) and publishes the Swift xcframework + Android
AAR — no draft, no lookup/retry, no manual finalize. The release event fires
only for genuine livekit-uniffi releases, so the "released this cycle" gate is
free (matches the node publish-directly model; Maven, unlike npm, can't dedupe,
so this event-gating replaces node's implicit idempotency).

ffi-builds.yml and its marker are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pblazej
pblazej force-pushed the blaze/fix-uniffi-trigger branch from 60157e2 to ed3de55 Compare July 27, 2026 11:41
@pblazej pblazej changed the title Fix uniffi release: publish the draft (Swift + Android; Flutter cdylibs deferred) Fix uniffi release: publish directly via knope, react on the release event Jul 27, 2026
devin-ai-integration[bot]

This comment was marked as resolved.

@pblazej
pblazej requested review from jhugman and lukasIO July 28, 2026 06:25

@ladvoc ladvoc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally makes sense to me, but I will defer to @lukasIO for the Knope config.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 1 new potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

Comment on lines 43 to +47
run: |
MANUAL_TAG="${{ inputs.tag_name }}"
if [ -n "$MANUAL_TAG" ]; then
TAG="$MANUAL_TAG"
echo "Using manually provided tag: '$TAG'"
else
TAG=$(gh release list --repo "${{ github.repository }}" \
--json 'isDraft,tagName' \
--jq "[.[] | select(.isDraft and (.tagName | startswith(\"${TAG_PREFIX}\")))] | first | .tagName // empty")
echo "Resolved livekit-uniffi draft release tag: '${TAG:-<none>}'"
fi
TAG="${{ github.event.release.tag_name || inputs.tag_name }}"
echo "tag_name=${TAG}" >> "$GITHUB_OUTPUT"
# Strip the "livekit-uniffi/v" prefix to get the hosting-repo tag (e.g., 0.0.7)
VERSION="${TAG#${TAG_PREFIX}}"
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
# Strip the "livekit-uniffi/v" prefix to get the package version (e.g. 0.1.6).
echo "version=${TAG#livekit-uniffi/v}" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟨 Release tag name is interpolated directly into a shell command

The new resolve-tag step embeds the release tag straight into a shell assignment (TAG="${{ github.event.release.tag_name || inputs.tag_name }}" at .github/workflows/uniffi-packages.yml:44). GitHub expression interpolation happens before the shell runs, so a tag name containing quotes/$(...)/backticks becomes part of the executed script. The value comes from a release/tag name (or a manual dispatch input), both of which require write access to create, so exploitability is limited — but the resulting shell content is attacker-influenced and the job runs with the repo's token and feeds the tag into downstream publish jobs.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@pblazej
pblazej merged commit 2220142 into main Jul 30, 2026
24 checks passed
@pblazej
pblazej deleted the blaze/fix-uniffi-trigger branch July 30, 2026 08:59
hiroshihorie added a commit that referenced this pull request Aug 11, 2026
Wire the existing uniffi-cdylib.yml into uniffi-packages.yml so every
livekit-uniffi release carries the build-<triple>.zip archives (and
sha256 sidecars) the Dart build hook downloads at consumer build time.
The assets attach to the already-published release, so the knope assets
marker stays off (a draft-based flow stranded releases before, #1256).

Since this activates the previously dormant uniffi-cdylib.yml on every
release, also bind its tag name through env instead of template
expanding it into the upload script: tag names may contain shell
metacharacters (Actions script injection).

The changeset cuts the release that carries the first assets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants