🆕 Build and publish Alpha on runtime changes

Build a new Alpha when packaging inputs change and queue an Alpha for
each upstream merge into the runtime maintenance branch.
This commit is contained in:
YXC0915 committed 2026-12-02 01:57:47 +08:00
1 parent ca116e4f36
commit 3cb5384b33
2 files changed
+29 -4

No files matched your search

+21
View File
@@ -17,8 +17,11 @@ jobs:
if: github.repository == 'reims-go/reims-vgpu'
runs-on: ubuntu-latest
timeout-minutes: 20
outputs:
runtime_commit: ${{ steps.merge.outputs.runtime_commit }}
steps:
- name: Merge upstream into the maintenance branch
id: merge
shell: bash
env:
GH_TOKEN: ${{ github.token }}
@@ -88,4 +91,22 @@ jobs:
echo "::add-mask::$auth"
git -c "http.https://github.com/.extraheader=AUTHORIZATION: basic $auth" \
push origin "$merged:refs/heads/$TARGET_BRANCH"
printf 'runtime_commit=%s\n' "$merged" >> "$GITHUB_OUTPUT"
summary "Merged upstream commit $source into $TARGET_BRANCH at $merged."
alpha:
# Pushes made by GITHUB_TOKEN do not start push-triggered workflows.
needs: sync
if: needs.sync.outputs.runtime_commit != ''
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
actions: write
steps:
- name: Queue Alpha for the merged commit
env:
GH_TOKEN: ${{ github.token }}
RUNTIME_COMMIT: ${{ needs.sync.outputs.runtime_commit }}
run: |
gh workflow run runtime-preview.yml --repo "$GITHUB_REPOSITORY" --ref master \
-f upstream_commit="$RUNTIME_COMMIT" -f publish=true
+8 -4
View File
@@ -1,6 +1,10 @@
name: Publish Runtime Preview
on:
push:
branches: [master]
paths:
- "packaging/windows-runtime/**"
schedule:
- cron: "23 3 * * *"
workflow_dispatch:
@@ -23,7 +27,7 @@ permissions:
concurrency:
group: build-runtime
cancel-in-progress: false
queue: max
env:
UPSTREAM_URL: ${{ github.server_url }}/${{ github.repository }}.git
@@ -41,7 +45,7 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WANT: ${{ inputs.upstream_commit }}
REBUILD: ${{ inputs.rebuild }}
REBUILD: ${{ github.event_name == 'push' || inputs.rebuild }}
run: |
set -euo pipefail
git clone -q --filter=blob:none --no-checkout --single-branch --branch "$UPSTREAM_BRANCH" "$UPSTREAM_URL" up
@@ -244,7 +248,7 @@ jobs:
retention-days: 14
- name: Publish alpha prerelease (never stable)
if: github.event_name == 'schedule' || inputs.publish
if: github.event_name == 'push' || github.event_name == 'schedule' || inputs.publish
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGED: ${{ steps.patches.outputs.merged }}
@@ -271,5 +275,5 @@ jobs:
Build: $env:GITHUB_SERVER_URL/$env:GITHUB_REPOSITORY/actions/runs/$env:GITHUB_RUN_ID
"@
gh release create "runtime-$c" @assets --repo $env:GITHUB_REPOSITORY --target '${{ needs.resolve.outputs.commit }}' --prerelease --title "Portable Runtime runtime-$c (alpha)" --notes $notes
gh release create "runtime-$c" @assets --repo $env:GITHUB_REPOSITORY --target '${{ needs.resolve.outputs.commit }}' --prerelease --latest=false --title "Portable Runtime runtime-$c (alpha)" --notes $notes
if ($LASTEXITCODE) { throw "gh release create failed ($LASTEXITCODE)" }