-
Notifications
You must be signed in to change notification settings - Fork 36
ci: add release-please-develop pre-release workflow #303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: release-please-develop | ||
|
|
||
| # Experimental / pre-release lane for the `develop` branch. | ||
| # | ||
| # This is a thin caller around the SHARED reusable workflow | ||
| # openfga/.github/.github/workflows/release-please-prerelease.yml. The common | ||
| # logic lives there so every SDK can onboard by copying just this file. | ||
| # | ||
| # It is completely separate from release-please.yml (the stable main flow): | ||
| # * targets the long-lived `develop` branch | ||
| # * only ever cuts pre-release versions (alpha/beta/rc) — enforced by the | ||
| # reusable workflow. Stable releases must go through main. | ||
| # | ||
| # Triggers: | ||
| # * workflow_dispatch → build a release PR for an explicit pre-release version | ||
| # * push to develop → when the `release:` PR merges, tag + draft + publish | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [develop] | ||
| workflow_dispatch: | ||
| inputs: | ||
| release-version: | ||
| description: > | ||
| Explicit pre-release version to cut (e.g. 0.10.0-beta.1, 0.10.0-rc.2). | ||
| Must include an alpha/beta/rc suffix. Stable versions are rejected. | ||
| required: true | ||
| type: string | ||
|
|
||
| jobs: | ||
| prerelease: | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| if: | | ||
| github.event_name == 'workflow_dispatch' || | ||
| startsWith(github.event.head_commit.message, 'release:') | ||
| uses: openfga/.github/.github/workflows/release-please-prerelease.yml@835baf31562809ad9eb884c73efc5b79318f700f # pin@main | ||
| with: | ||
| trigger-event: ${{ github.event_name }} | ||
| release-version: ${{ inputs.release-version || '' }} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
curl -fsSL 'https://raw.githubusercontent.com/openfga/.github/835baf31562809ad9eb884c73efc5b79318f700f/.github/workflows/release-please-prerelease.yml' |
rg -n 'inputs\.release-version|VERSION='Repository: openfga/python-sdk Length of output: 321 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== Workflow files =="
fd -a 'release-please.*\.ya?ml|release.*\.ya?ml' .github/workflows 2>/dev/null | sed 's#^\./##' | sort
echo
echo "== Caller workflow excerpt =="
if [ -f .github/workflows/release-please-develop.yml ]; then
nl -ba .github/workflows/release-please-develop.yml | sed -n '1,90p'
fi
echo
echo "== Reusable workflow excerpts around release-version =="
curl -fsSL 'https://raw.githubusercontent.com/openfga/.github/835baf31562809ad9eb884c73efc5b79318f700f/.github/workflows/release-please-prerelease.yml' > /tmp/release-prerelease.yml
nl -ba /tmp/release-prerelease.yml | sed -n '45,75p'
echo "---"
nl -ba /tmp/release-prerelease.yml | sed -n '125,148p'
echo "---"
nl -ba /tmp/release-prerelease.yml | sed -n '250,275p'
echo
echo "== Search all local workflow uses =="
rg -n "release-version|release-please-prerelease|uses:" .github/workflows || trueRepository: openfga/python-sdk Length of output: 369 🌐 Web query:
💡 Result: When passing inputs to a reusable workflow, direct interpolation of these inputs into shell commands via Citations:
🏁 Script executed: #!/bin/bash
set -euo pipefail
IFS=$'\n'
echo "== Caller workflow excerpt =="
if [ -f .github/workflows/release-please-develop.yml ]; then
awk '{printf "%6d\t%s\n", NR, $0}' .github/workflows/release-please-develop.yml | sed -n '1,90p'
fi
echo
echo "== Reusable workflow excerpts around release-version =="
curl -fsSL 'https://raw.githubusercontent.com/openfga/.github/835baf31562809ad9eb884c73efc5b79318f700f/.github/workflows/release-please-prerelease.yml' > /tmp/release-prerelease.yml
awk '{printf "%6d\t%s\n", NR, $0}' /tmp/release-prerelease.yml | sed -n '55,70p'
echo "---"
awk '{printf "%6d\t%s\n", NR, $0}' /tmp/release-prerelease.yml | sed -n '125,148p'
echo "---"
awk '{printf "%6d\t%s\n", NR, $0}' /tmp/release-prerelease.yml | sed -n '250,275p'
echo
echo "== Search all local workflow uses =="
rg -n "release-version|release-please-prerelease|workflow_dispatch|on:" .github/workflows || trueRepository: openfga/python-sdk Length of output: 8305 Use shell-safe input assignment in the reusable workflow before enabling this input. This passes the 🤖 Prompt for AI AgentsSource: MCP tools |
||
| base-branch: develop | ||
| staging-branch: release-develop | ||
| secrets: | ||
| RELEASER_APP_CLIENT_ID: ${{ secrets.RELEASER_APP_CLIENT_ID }} | ||
| RELEASER_APP_PRIVATE_KEY: ${{ secrets.RELEASER_APP_PRIVATE_KEY }} | ||
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | ||
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the publish claim in the trigger documentation.
The reusable workflow creates a signed tag and a draft prerelease; publishing is explicitly delegated to a later publish workflow. Update Line 16 to avoid misleading release operators. (raw.githubusercontent.com)
Proposed wording
📝 Committable suggestion
🤖 Prompt for AI Agents
Source: MCP tools