Skip to content

Commit 7b8b88f

Browse files
[bulk] Enable release automation and validation (#16)
Co-authored-by: camara-release-automation[bot] <261643975+camara-release-automation[bot]@users.noreply.github.com>
1 parent 758a91d commit 7b8b88f

3 files changed

Lines changed: 132 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# CAMARA Validation Framework — Caller Workflow
2+
#
3+
# Installed in API repositories by the CAMARA onboarding campaign
4+
# (camaraproject/project-administration). No modification needed;
5+
# all configuration is centralized in camaraproject/tooling.
6+
#
7+
# Replaces the legacy pr_validation_caller.yml (v0 validation).
8+
9+
name: CAMARA Validation
10+
11+
on:
12+
pull_request:
13+
branches:
14+
- main
15+
- release-snapshot/**
16+
- maintenance/**
17+
workflow_dispatch:
18+
19+
concurrency:
20+
group: ${{ github.ref }}-${{ github.workflow }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
checks: write
25+
pull-requests: write
26+
issues: write
27+
contents: read
28+
statuses: write
29+
id-token: write
30+
31+
jobs:
32+
validation:
33+
uses: camaraproject/tooling/.github/workflows/validation.yml@v1-rc
34+
secrets: inherit
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# CAMARA Release Automation — Caller Workflow
2+
#
3+
# Installed in API repositories by the CAMARA onboarding campaign
4+
# (camaraproject/project-administration). No modification needed;
5+
# all configuration is centralized in camaraproject/tooling.
6+
#
7+
# Triggers:
8+
# - Slash commands: /create-snapshot, /discard-snapshot, /delete-draft, /publish-release
9+
# - Issue events: close (with auto-reopen), reopen
10+
# - PR merge: on release-snapshot branches (creates draft release)
11+
# - Push to main: on release-plan.yaml, code/common/**, or this caller
12+
# workflow itself. All three paths end up running sync-issue so the
13+
# Release Issue body reflects the current repo state — most notably,
14+
# pushing to code/common/** (typically after a sync PR merge) refreshes
15+
# the common-cache status in the Release Issue and clears any stale warning.
16+
# - Manual: workflow_dispatch triggers sync-issue (reads from release-plan.yaml)
17+
18+
name: CAMARA Release Automation
19+
20+
on:
21+
# Slash commands via issue comments
22+
issue_comment:
23+
types: [created]
24+
25+
# Issue close/reopen events
26+
issues:
27+
types: [closed, reopened]
28+
29+
# PR merge to snapshot branches
30+
pull_request:
31+
types: [closed]
32+
branches:
33+
- 'release-snapshot/**'
34+
35+
# Push to main with release-plan.yaml, common file, or caller workflow changes.
36+
# Listing the caller itself as a path ensures the workflow runs once right
37+
# after it is merged (future caller updates pick up their own trigger).
38+
push:
39+
branches: [main]
40+
paths:
41+
- 'release-plan.yaml'
42+
- 'code/common/**'
43+
- '.github/workflows/release-automation.yml'
44+
45+
# Manual trigger for sync-issue only
46+
# Use this for: initial setup, recovery after manual repo changes, or forced sync
47+
# All other commands must be issued via slash commands in the Release Issue
48+
# Future: will accept branch input (main by default, maintenance branches as option)
49+
workflow_dispatch:
50+
51+
# Serialize release automation runs per repository.
52+
# Prevents race conditions from concurrent slash commands, issue events, PR merges,
53+
# and workflow_dispatch triggers. With cancel-in-progress: false, queued runs wait
54+
# for the current run to complete before starting.
55+
# Note: GitHub allows at most 1 running + 1 pending per concurrency group.
56+
# A third arrival replaces the pending run (acceptable — codeowners act carefully).
57+
concurrency:
58+
group: release-automation-${{ github.repository }}
59+
cancel-in-progress: false
60+
61+
permissions:
62+
contents: write
63+
issues: write
64+
pull-requests: write
65+
id-token: write
66+
67+
jobs:
68+
release-automation:
69+
# Skip if:
70+
# - issue_comment from the RA bot itself (its own replies, to prevent self-triggering)
71+
# - issue_comment but not a release command or not on a release issue
72+
# - issues event but not a release issue
73+
# - pull_request but not merged or not to a snapshot branch
74+
if: |
75+
(github.event_name == 'push') ||
76+
github.event_name == 'workflow_dispatch' ||
77+
(github.event_name == 'issue_comment' &&
78+
github.event.comment.user.login != 'camara-release-automation[bot]' &&
79+
contains(github.event.issue.labels.*.name, 'release-issue') &&
80+
(startsWith(github.event.comment.body, '/create-snapshot') ||
81+
startsWith(github.event.comment.body, '/discard-snapshot') ||
82+
startsWith(github.event.comment.body, '/delete-draft') ||
83+
startsWith(github.event.comment.body, '/publish-release') ||
84+
startsWith(github.event.comment.body, '/sync-issue'))) ||
85+
(github.event_name == 'issues' &&
86+
contains(github.event.issue.labels.*.name, 'release-issue')) ||
87+
(github.event_name == 'pull_request' &&
88+
github.event.pull_request.merged == true &&
89+
startsWith(github.event.pull_request.base.ref, 'release-snapshot/'))
90+
91+
uses: camaraproject/tooling/.github/workflows/release-automation-reusable.yml@v1-rc
92+
secrets: inherit

CHANGELOG/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Changelog
2+
3+
Release changelogs are organized by release cycle.
4+
5+
For historical release notes predating the automated release process,
6+
see [CHANGELOG.md](../CHANGELOG.md) in the repository root.

0 commit comments

Comments
 (0)