The v1.0.42 Release job hit timeout-minutes: 30 mid-upload while mirroring release assets to Gitee, so the Gitee release ended up missing dws-windows-arm64.zip and checksums.txt. Root cause + fixes: - sync-to-gitee.sh now skips assets already attached to the Gitee release, so a re-run only uploads what is missing (instead of re-uploading every artifact and creating duplicates). It no longer fails when everything is already present. - New workflow sync-release-to-gitee.yml (workflow_dispatch, version input) mirrors a published GitHub release's assets to Gitee on its own — it downloads the assets from the GitHub release and runs the idempotent sync, without running GoReleaser or touching the GitHub release (no outage). Use it to repair an incomplete Gitee mirror. - Bump the Release job timeout 30 -> 60 so a full Gitee upload has room. bash -n + YAML validated.
50 lines
1.5 KiB
YAML
50 lines
1.5 KiB
YAML
name: Sync release to Gitee
|
|
|
|
# Manually mirror a published GitHub release's assets to the matching Gitee
|
|
# release. Use this to repair a release whose Gitee mirror is incomplete (e.g.
|
|
# the Release job timed out mid-upload). It runs ONLY the idempotent Gitee sync
|
|
# step — it does not run GoReleaser and does not touch the GitHub release, so
|
|
# there is no release outage. The sync script skips assets already on Gitee, so
|
|
# this only uploads what is missing.
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "Release tag to mirror to Gitee (e.g. v1.0.42)"
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
sync-gitee:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 60
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download GitHub release assets
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
set -eu
|
|
mkdir -p dist
|
|
gh release download "${{ inputs.version }}" \
|
|
--repo "${{ github.repository }}" \
|
|
--dir dist \
|
|
--pattern 'dws-*' \
|
|
--pattern 'checksums.txt' \
|
|
--clobber
|
|
ls -la dist
|
|
|
|
- name: Mirror release to Gitee (China)
|
|
# Idempotent: uploads only assets not already present on the Gitee release.
|
|
run: ./scripts/release/sync-to-gitee.sh
|
|
env:
|
|
VERSION: ${{ inputs.version }}
|
|
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
|
|
GITEE_REPO: ${{ secrets.GITEE_REPO }}
|