Skip to content

fix: add checkout step to publish job in release pipeline#2

Merged
adaasch merged 4 commits into
masterfrom
copilot/fix-release-pipeline-issue
Apr 10, 2026
Merged

fix: add checkout step to publish job in release pipeline#2
adaasch merged 4 commits into
masterfrom
copilot/fix-release-pipeline-issue

Conversation

Copilot AI commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

The publish job called gh release create without a git repo present, causing it to fail with fatal: not a git repository. The gh CLI requires a git context to identify the target repository.

Changes

  • Core fix: Added actions/checkout@v6 to the publish job with ref: ${{ inputs.tag || github.sha }}
  • Checkout ref: Changed fallback from github.ref to github.sha across all jobs for deterministic checkout behavior
  • Version derivation: Both build and publish jobs now handle non-tag triggers by reading version from Cargo.toml (previously GITHUB_REF_NAME would be a branch name)
  • gh release create: Added --target ${{ github.sha }} to pin the created tag to the triggering commit
  • workflow_dispatch: Made inputs.tag optional; when omitted, version is derived from Cargo.toml
  • Branch trigger: Added push: branches: [copilot/fix-release-pipeline-issue] to allow pipeline testing without requiring a new tag push
  • Cargo.toml: Bumped version to 0.1.3

@adaasch
adaasch marked this pull request as ready for review April 10, 2026 11:36
@adaasch
adaasch merged commit 392b772 into master Apr 10, 2026
6 checks passed
@adaasch
adaasch deleted the copilot/fix-release-pipeline-issue branch April 10, 2026 12:29
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.

2 participants