Skip to content
Merged
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
33 changes: 33 additions & 0 deletions .github/workflows/sync-develop-to-test-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Sync develop to test-release

on:
push:
branches:
- develop

jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Sync test-release to develop
env:
GITHUB_ACTOR: ${{ github.actor }}
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"

# 拉取最新的 develop 和 test-release
git fetch origin develop test-release

# 基于最新 develop 创建/重置本地临时分支
git checkout -B sync-temp origin/develop

# 强制将远端 test-release 覆盖为 develop 当前状态
git push origin +sync-temp:test-release