Repository navigation
48 lines (45 loc) · 2.45 KB
/
Copy pathrelease.yml
File metadata and controls
48 lines (45 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Configuration is read from .github/project.yml - no inputs needed!
#
# MERGING A CHANGE OF release.current-version IN .github/project.yml IS A RELEASE.
# The central guard inside reusable-maven-release.yml publishes to Maven Central whenever
# current-version differs from the merge commit's first parent and is untagged. Every other
# project.yml edit reaches this workflow too (paths: is only a prefilter) and is refused there.
# plan-marshall-mcp 0.1.0 was published by accident exactly this way: its bootstrap PR moved the
# template's current-version while customizing. Change current-version only through the release
# runbook (.claude/skills/release/SKILL.md).
#
# workflow_dispatch is NOT guarded: the central guard proceeds unconditionally on a dispatch, including
# an unchanged or already-tagged version. It is the deliberate fallback path (and the path of a derived
# repository's first release); the runbook's pre-cut checks are the only gate there.
name: Release
on:
workflow_dispatch:
# PREFILTER ONLY, NEVER THE DECISION. `branches:` is the PR's base: only merges into main may ask.
pull_request:
types: [closed]
branches: [main]
paths: ['.github/project.yml']
permissions:
contents: read
jobs:
release:
# ANDed with the central guard, never an alternative to it:
# 1. The template repository itself never releases. Repositories created from it carry this
# line unchanged and are unaffected. customize.sh deliberately does NOT rewrite this file:
# renaming the literal below to the new repository would disable its releases.
# 2. A dispatch (which takes no branch filter) runs from main only.
# 3. A PR closed without merging never releases.
if: >-
github.repository != 'cuioss/cui-java-module-template' &&
(github.event_name != 'workflow_dispatch' || github.ref == 'refs/heads/main') &&
(github.event_name != 'pull_request' || github.event.pull_request.merged == true)
permissions:
contents: write
uses: cuioss/cuioss-organization/.github/workflows/reusable-maven-release.yml@a7e76c841bc9bf8bb91be66c979762724956016c # v0.46.0
secrets:
RELEASE_APP_ID: ${{ secrets.RELEASE_APP_ID }}
RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
OSS_SONATYPE_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
OSS_SONATYPE_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}