Skip to content

Commit 689b417

Browse files
authored
Add OIDC-based buildpack release workflow (#2099)
Calls the shared `_classic-buildpack-publish.yml` workflow from `heroku/languages-github-actions` to publish the `heroku/python` buildpack to the registry via OIDC. Auto-triggers when the Linguist-authored "Prepare release" PR is merged to `main` (guarded on event, branch, repo, and PR author). Also supports manual `workflow_dispatch`. Mirrors the pattern established in heroku/heroku-buildpack-nodejs#1653. GUS-W-22295409 is the reference implementation; this is the python caller workflow for the OIDC-Based Classic Buildpack Publishing epic. GUS-W-22295419.
1 parent 18826fe commit 689b417

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release Buildpack
2+
3+
on:
4+
# Auto-trigger when the "Prepare release" PR (created by the
5+
# _classic-buildpack-prepare-release.yml workflow) is merged.
6+
pull_request:
7+
branches:
8+
- main
9+
types:
10+
- closed
11+
workflow_dispatch:
12+
13+
permissions:
14+
id-token: write
15+
contents: write
16+
17+
jobs:
18+
release:
19+
name: Release
20+
# On `pull_request`, only run for the merged auto-generated
21+
# "Prepare release" PR (branch name set by
22+
# _classic-buildpack-prepare-release.yml). Manual dispatches always run.
23+
if: >-
24+
github.event_name == 'workflow_dispatch' ||
25+
(github.event.pull_request.merged == true &&
26+
github.event.pull_request.head.repo.full_name == github.repository &&
27+
github.event.pull_request.head.ref == 'prepare-release' &&
28+
github.event.pull_request.user.login == 'heroku-linguist[bot]')
29+
uses: heroku/languages-github-actions/.github/workflows/_classic-buildpack-publish.yml@latest
30+
with:
31+
buildpack_id: "heroku/python"

0 commit comments

Comments
 (0)