Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 28, 2025

Plan: Add release dispatch workflow

  • Explore repository structure and understand version files
  • Understand release process and tagging conventions
  • Create workflow_dispatch workflow with dropdown for release types
  • Implement version file update logic (remove -dev suffix)
  • Implement PR creation for version bump
  • Refactor to use gh-actions/jq for version file mapping
  • Refactor to use gh-actions/bson for version operations
  • Replace peter-evans/create-pull-request with gh-actions/github/pr
  • Use gh-actions/version for version parsing
  • Combine steps where possible
  • Add dry-run mode for testing
  • Rename workflow to "Release"
  • Code review completed
  • CodeQL security scan completed (no issues)

Final Implementation

The Release workflow (.github/workflows/release-dispatch.yml) provides a manual trigger for version bumps using internal toolshed actions:

Inputs:

  • Release type dropdown: Choose from actions, bins, bazel, or python
  • Dry-run mode: Optional boolean (default: false) to test without creating PR

Actions used:

  • jq action: Maps release type to version file (YAML input)
  • version action: Parses version and provides structured JSON output with is_dev, next, and version component fields
  • bson action: Updates file only if version has -dev suffix
  • github/pr action: Creates PR with gh CLI (skipped in dry-run mode)

Dry-run Mode:
When enabled, the workflow reads version information, updates the file locally (not committed), and displays a summary of what would happen without creating a PR. This allows safe testing in PRs without side effects.

The workflow leverages the existing gh-actions/version action which provides intelligent version parsing, automatically calculating the next release version by stripping the -dev suffix when present.

All linting passed ✅
All security checks passed ✅

Original prompt

this repo publishes four types of release

  • actions
  • bins
  • bazel
  • python

i would like to add a dispatch workflow

the first arg should be a dropdown with those 4 release types

when triggered it should update the respective version file and create a PR


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@netlify
Copy link

netlify bot commented Dec 28, 2025

Deploy Preview for nifty-bassi-e26446 ready!

Name Link
🔨 Latest commit 5a5d885
🔍 Latest deploy log https://app.netlify.com/projects/nifty-bassi-e26446/deploys/69529fddda2e5a0008a890e3
😎 Deploy Preview https://deploy-preview-3257--nifty-bassi-e26446.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI changed the title [WIP] Add dispatch workflow for release types Add workflow_dispatch for release version bumps Dec 28, 2025
Copilot AI requested a review from phlax December 28, 2025 11:23
@phlax
Copy link
Member

phlax commented Dec 28, 2025

@copilot not a bad first attempt - but it could be a lot cleaner

firstly - use the gh-actions/jq action for the version-file - it shoudl take an input of yaml - like

actions: gh-actions/VERSION.txt
bins: BINS_VERSION.txt
etc

(jq action outputs a outputs.value)

next current-version should use gh-actions/bson

dont use uses: peter-evans/create-pull-request@98357b1 # v8

use bson and gh

same with other steps basically - either use jq or bson - and combine steps where possible

Copy link
Contributor Author

Copilot AI commented Dec 28, 2025

@copilot not a bad first attempt - but it could be a lot cleaner

firstly - use the gh-actions/jq action for the version-file - it shoudl take an input of yaml - like...

Refactored in 966b6b7:

  • Using gh-actions/jq for version file mapping with YAML input
  • Using gh-actions/bson for version read/update in single step
  • Using gh-actions/github/pr instead of peter-evans action
  • Combined steps to reduce complexity (3 steps total now vs 7 before)

@phlax
Copy link
Member

phlax commented Dec 28, 2025

@copilot looks better - but there is a version action - i think we should use that

Copy link
Contributor Author

Copilot AI commented Dec 28, 2025

@copilot looks better - but there is a version action - i think we should use that

Using gh-actions/version in 0fdadb7. The version action provides JSON output with is_dev, next, and other fields, making the workflow cleaner and leveraging existing tooling for version parsing.

@phlax
Copy link
Member

phlax commented Dec 28, 2025

@copilot it needs a dry run mode so it can be tested in a pr also name should be Release

Copy link
Contributor Author

Copilot AI commented Dec 28, 2025

@copilot it needs a dry run mode so it can be tested in a pr also name should be Release

Added in 72dd372:

  • Renamed workflow to "Release"
  • Added dry-run boolean input (default: false)
  • PR creation skipped when dry-run is enabled
  • Dry run summary shows what would happen without creating PR

This allows testing the workflow in PRs without side effects.

@phlax phlax force-pushed the copilot/add-dispatch-workflow branch 6 times, most recently from e4b9dea to d39ce9d Compare December 29, 2025 15:25
@phlax phlax changed the title Add workflow_dispatch for release version bumps ci: Add workflows for creating releases Dec 29, 2025
Signed-off-by: Ryan Northey <ryan@synca.io>
@phlax phlax force-pushed the copilot/add-dispatch-workflow branch from d8bba99 to 5a5d885 Compare December 29, 2025 15:35
@phlax phlax marked this pull request as ready for review December 29, 2025 15:36
@phlax phlax merged commit 1b157c5 into main Dec 29, 2025
78 checks passed
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