Skip to content

feat: release workflow on tag push with create-or-upload logic#15

Merged
vmvarela merged 1 commit intomasterfrom
feature/issue-5-release-binaries
Mar 2, 2026
Merged

feat: release workflow on tag push with create-or-upload logic#15
vmvarela merged 1 commit intomasterfrom
feature/issue-5-release-binaries

Conversation

@vmvarela
Copy link
Owner

@vmvarela vmvarela commented Mar 2, 2026

Closes #5

Changes

  • Trigger: changed from release: published to push: tags: v*.*.* so the workflow fires automatically when a version tag is pushed — no manual release publishing required.
  • Release job: replaced the bare gh release upload (which would fail if no release exists yet) with create-or-update logic:
    • If Release Drafter has already drafted a release for this tag → publish it (--draft=false) and upload all assets.
    • Otherwise → create a new release with --generate-notes and upload assets in one step.
  • SHA256 checksums (sha256sums.txt) are still generated and included as an asset.
  • .github/release-drafter.yml and its trigger workflow were already present from prior work.

Acceptance Criteria

  • CI workflow triggers on push to tags matching v*.*.*
  • Builds static binaries for x86_64-linux-musl, x86_64-macos, aarch64-macos, x86_64-windows (and many more)
  • All binaries are attached to the GitHub Release as assets
  • Each asset is named sql-pipe-<target> (or .exe for Windows)
  • SHA256 checksums file is also attached
  • Release notes are auto-generated from merged PRs (Release Drafter + --generate-notes fallback)

…#5)

- Change trigger from 'release: published' to 'push: tags v*.*.*'
- Replace bare 'gh release upload' with create-or-update logic:
  * If a draft/release already exists (Release Drafter), publish it and
    upload all assets (--clobber for idempotency)
  * Otherwise create a new release with --generate-notes and upload assets
- SHA256 checksums are still generated and attached as an asset
- Release Drafter config (.github/release-drafter.yml) already present
Copilot AI review requested due to automatic review settings March 2, 2026 14:30
@github-actions github-actions bot added the type:chore Maintenance, refactoring, tooling label Mar 2, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the GitHub Actions release pipeline so releases are produced automatically on version tag pushes and assets are reliably attached even when a release doesn’t already exist.

Changes:

  • Switch workflow trigger from release: published to push on tags matching v*.*.*.
  • Add “create-or-update” logic to publish an existing drafted release or create a new release (with generated notes) before uploading assets.
  • Keep generating and uploading sha256sums.txt alongside the built binaries.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +129 to +133
- name: Create or update GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ github.ref_name }}" artifacts/* \
--repo "${{ github.repository }}" \
--clobber
if gh release view "${{ github.ref_name }}" --repo "${{ github.repository }}" > /dev/null 2>&1; then
Copy link

Copilot AI Mar 2, 2026

Choose a reason for hiding this comment

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

The release job sets permissions: contents: write only, which makes all other token scopes none. actions/download-artifact@v4 typically requires actions: read to download artifacts, so this job can fail with a 403 even though contents is writeable. Add actions: read to the job permissions (or remove the permissions override and set them at workflow level) while keeping contents: write for the gh release commands.

Copilot uses AI. Check for mistakes.
@vmvarela vmvarela merged commit 0810492 into master Mar 2, 2026
10 checks passed
@vmvarela vmvarela deleted the feature/issue-5-release-binaries branch March 2, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:chore Maintenance, refactoring, tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross-platform release binaries via GitHub Actions (Linux, macOS, Windows)

2 participants