Skip to content

Refactor release.yml: tag-triggered, multi-channel via environments #274

Description

@ChrisonSimtian

Sibling of milestone #13. RFC #267.

What

Rewrite .github/workflows/release.yml from its current stopgap shape (workflow_dispatch only) to the real model: tag-triggered, three deployment records, one per environment.

on:
  push:
    tags:
      - 'v*'

Plus a guard that the tag is pointing at a release/v* branch (defensive — prevents accidental publishes from tags pointing at random commits).

Acceptance criteria

  • Trigger is push.tags: v*.
  • Job validates that the tagged commit is reachable from a release/v* branch (git branch -r --contains $GITHUB_SHA | grep -E 'origin/release/v[0-9]+').
  • Test + Pack run once (shared artifacts).
  • Three parallel publish jobs, each with environment: declared:
    • publish-nuget-org (env: nuget-org, requires approval) → dotnet nuget push ... nuget.org
    • publish-github-packages (env: github-packages) → dotnet nuget push ... github.pkg
    • publish-github-releases (env: github-releases) → gh release upload (or actions/upload-release-asset)
  • Each publish job creates a deployment record (automatic via environment: keyword).
  • Nuke.* transition-shim push (currently inline at the bottom of the workflow) is folded into publish-github-packages — same destination.
  • On nuget-org publish failure: job retries with --skip-duplicate semantics so partial successes are recoverable.
  • workflow_dispatch trigger preserved as a backup with a clear in-file comment that it's the fallback (e.g. for re-running a partial publish that hit a transient API failure).

Depends on

  • release/v11 exists.
  • Three environments exist.
  • NUGET_API_KEY migrated to env secret.

Notes

  • Build.CI.GitHubActions.cs is the source of truth for consumer-facing generated workflows. This file (release.yml) is hand-written — header comment already documents this. The refactor doesn't affect generated output.
  • This is the biggest single PR of the milestone. Worth landing the env + secret pieces first so this PR is purely YAML structure changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions