ci(release): isolate GitCode mirroring workflow

This commit is contained in:
lzt404 committed 2026-08-05 17:15:40 +08:00
1 parent ff1ac4ca5a
commit d679f8983f
2 files changed
+86 -12

No files matched your search

+2 -12
View File
@@ -391,7 +391,7 @@ jobs:
if-no-files-found: error
retention-days: 14
publish:
name: Publish releases
name: Publish GitHub release
if: >-
(github.event_name == 'release' && github.event.release.prerelease == true)
|| startsWith(github.ref, 'refs/tags/')
@@ -400,7 +400,7 @@ jobs:
- version
- build
runs-on: ubuntu-24.04
timeout-minutes: 30
timeout-minutes: 15
steps:
- uses: actions/checkout@v7
with:
@@ -461,13 +461,3 @@ jobs:
else
gh release create "$RELEASE_TAG" "${release_args[@]}" artifacts/*
fi
- name: Publish GitCode mirror
if: ${{ vars.GITCODE_REPOSITORY != '' }}
env:
ARTIFACT_DIRECTORY: artifacts
GITCODE_ACCESS_TOKEN: ${{ secrets.GITCODE_ACCESS_TOKEN }}
GITCODE_REPOSITORY: ${{ vars.GITCODE_REPOSITORY }}
GITCODE_TARGET_COMMITISH: ${{ vars.GITCODE_TARGET_COMMITISH || 'main' }}
PRERELEASE: ${{ github.event_name == 'release' && github.event.release.prerelease || inputs.prerelease }}
RELEASE_TAG: ${{ needs.version.outputs.tag }}
run: node scripts/publish-gitcode-release.mjs