Skip to content

ci: release the shared actions automatically #24

Closed

Description

@uniqueg

Summary

Callers pin the shared actions as uses: elixir-cloud-aai/.github/actions/<name>@<sha> # vX.Y.Z, and Dependabot (github-actions ecosystem) in each caller is meant to bump these pins. But this repository has no tags yet, and RELEASING.md describes manual tags and releases. Releases here should happen automatically, with no manual steps for the maintainers.

Why tags are needed

For a pin to a commit SHA, Dependabot looks for a version tag on the pinned commit. If it finds one, it bumps the pin to the commit of the latest version tag and updates the # vX.Y.Z comment. If it doesn't, it moves the pin to the head of the branch that contains the commit, and the comment stays stale (dependabot-core, github_actions/.../package_details_fetcher.rb; changelog 2022-10-31). Dependabot reads git tags. It needs neither GitHub releases nor moving major tags (v1).

Proposal

  • A Release workflow (release.yml) runs after CI passed for a push to main (workflow_run). It creates the next semver tag and a GitHub release on that commit via the API, so no commits are pushed to main.
  • It releases only if a commit since the last tag changed what callers run: files under actions/ other than Markdown. Changes to docs, CI or templates alone don't release, so callers get no Dependabot PRs for them. The type is not used to decide this, because some actions were added with ci: commits.
  • Version bump from the Conventional Commit messages of those commits: ! or a BREAKING CHANGE: footer gives a major release, feat a minor release, anything else a patch release. The first release is v1.0.0.
  • Release notes in the organisation's format, generated from the squash-merge subjects and the issues their PRs close. Sections by type, with an intro paragraph and GitHub's generated notes under ## Commits.
  • Tests of the version and notes scripts in CI, like the tests of the actions.
  • Update RELEASING.md and the READMEs of the actions (gate, pr-title, scan-image).

Notes

  • Tags are lightweight tags created by the release API, not signed annotated tags as planned in ci: share workflow steps as composite actions #11. Immutable releases give each release an attestation instead.
  • If a tag ruleset doesn't let GitHub Actions create v* tags, the release step fails and nothing is created.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: hightype: ci / cdworkload: hours

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions