Skip to content

feat: add deployment tagging, GitHub Releases, and PR template#163

Merged
mahata merged 3 commits intomainfrom
opencode/clever-lagoon
Mar 30, 2026
Merged

feat: add deployment tagging, GitHub Releases, and PR template#163
mahata merged 3 commits intomainfrom
opencode/clever-lagoon

Conversation

@mahata
Copy link
Copy Markdown
Owner

@mahata mahata commented Mar 30, 2026

Summary

  • Add a post-deploy step to deploy.yml that creates a git tag (deploy-YYYY-MM-DD-SHA) and a GitHub Release with auto-generated notes after each successful production deployment
  • Add a default PR template with a pre-deploy checklist for PRs targeting prod

Details

Deployment Tracking (deploy.yml)

After a successful Cloudflare Workers deploy, the workflow now:

  1. Fetches existing tags (needed because actions/checkout does a shallow clone)
  2. Creates a git tag in the format deploy-2026-03-30-a1b2c3d
  3. Pushes the tag to the remote
  4. Creates a GitHub Release with auto-generated notes covering all changes since the previous deploy-* tag

This provides:

  • Exact commit tracking: each tag points to the deployed commit
  • Deployment history: git tag -l 'deploy-*' or the GitHub Releases page
  • Changelog per deploy: auto-generated release notes list included PRs/commits

The workflow gets permissions: contents: write to push tags and create releases via GITHUB_TOKEN.

PR Template (.github/PULL_REQUEST_TEMPLATE.md)

A default template shown for all new PRs with:

  • Summary section
  • Included Changes section (with link to compare view)
  • Pre-deploy checklist (CI, migrations, secrets, Durable Objects)
  • Rollback plan section

Add a post-deploy step to deploy.yml that creates a git tag
(deploy-YYYY-MM-DD-SHA) and a GitHub Release with auto-generated
notes after each successful production deployment. This provides
a clear history of which commits were deployed and when.

Add a default PR template with a pre-deploy checklist covering
CI status, migration review, secrets, and Durable Objects state.
Copilot AI review requested due to automatic review settings March 30, 2026 06:32
Copy link
Copy Markdown
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

Adds automated deployment tracking to the production deploy workflow by tagging each successful deploy and creating a corresponding GitHub Release, and introduces a default PR template with a pre-deploy checklist to standardize releases to prod.

Changes:

  • Grant workflow permission to write repository contents so it can push tags and create releases.
  • After successful deploy, fetch tags, create a deploy-YYYY-MM-DD-SHA tag, push it, and create a GitHub Release with autogenerated notes since the previous deploy tag.
  • Add .github/PULL_REQUEST_TEMPLATE.md with summary, checklist, and rollback plan prompts.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/deploy.yml Adds post-deploy tagging + GitHub Release creation for production deployments.
.github/PULL_REQUEST_TEMPLATE.md Adds a default PR template with a pre-deploy checklist and rollback plan section.

Comment on lines +7 to +9
permissions:
contents: write

Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

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

Workflow-wide permissions: contents: write grants write access to the repo token for all jobs (including test/e2e). Consider setting a read-only default at the workflow level and granting contents: write only on the deploy job (or even only on the release/tagging step) to reduce the blast radius if a job step is compromised.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@copilot apply changes based on this feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done in ac8d3b5. Changed the workflow-level permission to contents: read (so test and e2e jobs only get read access) and added permissions: contents: write scoped to the deploy job only.

Comment thread .github/workflows/deploy.yml Outdated
Comment thread .github/workflows/deploy.yml
mahata and others added 2 commits March 30, 2026 15:36
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mahata mahata merged commit cf9b1e1 into main Mar 30, 2026
3 checks passed
@mahata mahata deleted the opencode/clever-lagoon branch March 30, 2026 07:26
Copy link
Copy Markdown

@warcvs-svg warcvs-svg left a comment

Choose a reason for hiding this comment

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

={_/_}

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.

4 participants