fix: CI release failures — commit Cargo.lock + add permissions#9
Merged
Conversation
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.
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 free
to 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.
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.1failed to compile withcannot find type IMarshal in module windows_core::impRoot cause:
Cargo.lockwas in.gitignore, so CI resolved fresh dependency versions from scratch every build. The latest resolved combination ofwindows-future,windows-core, andwindows-syshad a breaking incompatibility. Your local build worked because your localCargo.lockpinned compatible versions.Fix: Remove
Cargo.lockfrom.gitignoreand 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-releaseRoot cause: The
tauri-apps/tauri-actionstep needs to create a GitHub release via the REST API, but the workflow'sGITHUB_TOKENdefaulted to read-only permissions.Fix: Add top-level
permissions: contents: writetorelease.yml.After merge
Delete the failed
v1.0.0tag 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 --tagsThis will trigger a fresh release build with the lockfile and correct permissions.
Files changed