Skip to content

fix: CI release failures — commit Cargo.lock + add permissions#9

Merged
proofofprints merged 1 commit into
mainfrom
fix-ci-release
Apr 12, 2026
Merged

fix: CI release failures — commit Cargo.lock + add permissions#9
proofofprints merged 1 commit into
mainfrom
fix-ci-release

Conversation

@proofofprints
Copy link
Copy Markdown
Owner

Summary

Fixes both issues that caused all 4 release builds to fail on the v1.0.0 tag push.

Issue 1: Cargo.lock was gitignored (macOS + Linux + Windows build failures)

Error: windows-future 0.2.1 failed to compile with cannot find type IMarshal in module windows_core::imp

Root cause: Cargo.lock was in .gitignore, so CI resolved fresh dependency versions from scratch every build. The latest resolved combination of windows-future, windows-core, and windows-sys had a breaking incompatibility. Your local build worked because your local Cargo.lock pinned compatible versions.

Fix: Remove Cargo.lock from .gitignore and commit the working lockfile (6893 lines pinning all transitive deps). This is the recommended practice for binary crates — only library crates should gitignore their lockfile.

Issue 2: Missing permissions (Windows build failure)

Error: Resource not accessible by integration - https://docs.github.com/rest/releases/releases#create-a-release

Root cause: The tauri-apps/tauri-action step needs to create a GitHub release via the REST API, but the workflow's GITHUB_TOKEN defaulted to read-only permissions.

Fix: Add top-level permissions: contents: write to release.yml.

After merge

Delete the failed v1.0.0 tag and re-tag:

git tag -d v1.0.0
git push origin :refs/tags/v1.0.0
git checkout main && git pull
git tag v1.0.0
git push --tags

This will trigger a fresh release build with the lockfile and correct permissions.

Files changed

.gitignore                     | -1 (removed Cargo.lock line)
.github/workflows/release.yml | +3 (added permissions block)
src-tauri/Cargo.lock           | +6893 (NEW — committed from local working state)

Two issues caused all 4 release builds to fail:

1. Cargo.lock was gitignored — CI resolved fresh dependency versions
   every build, pulling in windows-future 0.2.1 which has a breaking
   incompatibility with the windows-core version resolved alongside
   it (IMarshal not found). The local build worked because the local
   Cargo.lock pinned compatible versions. Fix: remove Cargo.lock from
   .gitignore and commit the working lockfile (6893 lines, pinning
   all transitive deps to known-good versions). This is the correct
   practice for binary crates per Cargo documentation.

2. The release workflow lacked permissions to create GitHub releases.
   The tauri-apps/tauri-action step got "Resource not accessible by
   integration" when trying to create the draft release via the
   GitHub REST API. Fix: add top-level `permissions: contents: write`
   to release.yml so GITHUB_TOKEN has write access to releases.
@proofofprints proofofprints merged commit d97ca2d into main Apr 12, 2026
1 check passed
@proofofprints proofofprints deleted the fix-ci-release branch April 18, 2026 02:28
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.

1 participant