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
46 changes: 44 additions & 2 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Release PR

on:
push:
branches:
- main
workflow_run:
workflows:
- Release
Expand All @@ -18,12 +21,51 @@ permissions:

concurrency:
group: fork-release-pr
cancel-in-progress: false
cancel-in-progress: ${{ github.event_name == 'push' }}

jobs:
trigger:
name: Resolve release PR trigger
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
prepare: ${{ steps.release_state.outputs.prepare }}
steps:
- name: Checkout main
uses: actions/checkout@v6
with:
ref: main
fetch-depth: 0

- name: Fetch release tags
run: git fetch --force --tags origin

- id: release_state
name: Check release state
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
WORKFLOW_RUN_SHA: ${{ github.event.workflow_run.head_sha }}
run: |
package_version="$(node -p "require('./apps/server/package.json').version")"
package_tag_sha="$(git rev-parse "refs/tags/v${package_version}^{commit}" 2>/dev/null || true)"
prepare=false

if [[ "$EVENT_NAME" == "workflow_run" ]]; then
if [[ "$package_tag_sha" == "$WORKFLOW_RUN_SHA" ]]; then
prepare=true
fi
elif [[ -n "$package_tag_sha" ]]; then
prepare=true
fi

echo "prepare=$prepare" >> "$GITHUB_OUTPUT"

prepare:
name: Prepare stable release PR
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
needs: trigger
if: needs.trigger.outputs.prepare == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
Expand Down
3 changes: 2 additions & 1 deletion FORK.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ This repository is a fork of `pingdotgg/t3code`. Keep this file focused on fork

- Fork workflows create/update a daily stable release PR while main-branch pushes produce nightly releases.
- Stable release PRs list every commit since the previous stable tag, including commits brought in by upstream merges.
- Release PR preparation runs after release publication so tag-based version resolution sees the latest release.
- Main-branch pushes update the stable release PR immediately when the committed package version is already tagged.
- Stable-version pushes wait for the matching release to finish so tag-based version resolution advances past the published version.
- Release build jobs skip relay client tracing config because the relay config job is disabled.
- Release builds publish updater metadata against the fork repository.
- Fork stable release versions are committed through release PRs before release artifacts are built and tagged.
Expand Down
Loading