Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ on:
types:
- completed
status: {}

# Least-privilege: pascalgn/automerge-action merges PRs with GITHUB_TOKEN,
# which requires contents:write (merge) and pull-requests:write.
permissions:
contents: write
pull-requests: write

jobs:
automerge:
runs-on: ubuntu-latest
Expand Down
47 changes: 36 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Auto-generated by Cimas: Do not edit it manually!
# See https://github.com/metanorma/cimas
# Variant of `release.yml` for gems whose maintainers write GitHub Release
# notes by hand at release time and want to opt out of the auto-generated
# notes floor introduced in metanorma/ci#354.
#
# The only difference from the parent `release.yml` template is the
# `release_notes: manual` input passed to the reusable `rubygems-release.yml`
# — that flag makes the reusable's Ensure-GitHub-Release step skip itself
# entirely, leaving Release creation + notes authoring to the maintainer.
#
# Used by opoudjis-maintained gems (all `metanorma-*` except
# `metanorma-plugin-*` and `metanorma-utils`, plus `isodoc`, `isodoc-i18n`,
# `basicdoc-models`). See the `release_wo_bundle_install_manual_notes.yml`
# sibling variant for gems that also opt out of the shared workflow's
# implicit bundle install (metanorma-utils today). Gems mapping
# `release_github_packages.yml` are exempt-by-construction — that
# template calls `ghpkg-release.yml`, not `rubygems-release.yml`, so
# metanorma/ci#354's auto-notes floor doesn't reach them.
#
# To switch from opt-out back to the auto-notes floor: change the
# cimas.yml mapping for this gem from `master/release_manual_notes.yml`
# back to `master/release.yml`. No content edit needed.
#
# See metanorma/ci#354 for the rationale and metanorma/ci#PR-number for
# the introduction of this variant.

name: release

on:
Expand All @@ -14,22 +39,22 @@ on:
repository_dispatch:
types: [ do-release ]

# Least-privilege ceiling for the called rubygems-release.yml: its release job
# needs contents:write (git tag push) and id-token:write (OIDC Trusted Publishing).
permissions:
contents: write
id-token: write

jobs:
release:
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
with:
next_version: ${{ github.event.inputs.next_version }}
# Explicit release_command needed since metanorma/ci#314 deprecated
# `bundler_cache` (hardcoded to false) — the reusable's release job no
# longer runs `bundle install` implicitly via ruby/setup-ruby, so the
# default `bundle exec rake release` fires against uninstalled gems.
# Surfaced by kwkwan on metanorma-plugin-lutaml#285. Deeper fix
# (bundle install inside rubygems-release.yml's release job) tracked
# separately.
release_command: |
bundle install
bundle exec rake release
# Opt out of the auto-generated GitHub Release notes floor added in
# metanorma/ci#354. Notes are written by hand at release time; the
# workflow skips the ensure-release step entirely and the maintainer
# creates the Release with their own notes.
release_notes: manual
secrets:
rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}

Loading