mirror of
https://github.com/vastsa/FileCodeBoxFronted.git
synced 2026-11-24 21:58:01 +08:00
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: Release Please
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
actions: write
|
|
contents: write
|
|
pull-requests: write
|
|
|
|
concurrency:
|
|
group: release-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- id: release
|
|
uses: googleapis/release-please-action@v4
|
|
with:
|
|
config-file: release-please-config.json
|
|
manifest-file: .release-please-manifest.json
|
|
|
|
- name: Merge release pull request
|
|
if: ${{ steps.release.outputs.prs_created == 'true' }}
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
GH_REPO: ${{ github.repository }}
|
|
RELEASE_PR_JSON: ${{ steps.release.outputs.pr }}
|
|
run: |
|
|
RELEASE_PR="$(jq -r '.number' <<< "$RELEASE_PR_JSON")"
|
|
for attempt in {1..120}; do
|
|
if gh pr merge "$RELEASE_PR" --squash --delete-branch; then
|
|
break
|
|
fi
|
|
if [[ "$attempt" -eq 120 ]]; then
|
|
echo "Timed out waiting for release PR #$RELEASE_PR to merge" >&2
|
|
exit 1
|
|
fi
|
|
sleep 10
|
|
done
|
|
gh workflow run release-please.yml --ref main
|