feat(release): add GitCode fallback mirror
This commit is contained in:
1 parent
391fc877a7
commit
06f024abde
6 files changed
+475
-20
No files matched your search
@@ -166,6 +166,7 @@ jobs:
|
||||
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||
- name: Build GUI
|
||||
env:
|
||||
GITCODE_REPOSITORY: ${{ vars.GITCODE_REPOSITORY }}
|
||||
RUSTFLAGS: -D warnings
|
||||
run: |
|
||||
bun install --frozen-lockfile
|
||||
@@ -390,7 +391,7 @@ jobs:
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
publish:
|
||||
name: Publish GitHub release
|
||||
name: Publish releases
|
||||
if: >-
|
||||
(github.event_name == 'release' && github.event.release.prerelease == true)
|
||||
|| startsWith(github.ref, 'refs/tags/')
|
||||
@@ -399,7 +400,7 @@ jobs:
|
||||
- version
|
||||
- build
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 15
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
@@ -417,6 +418,7 @@ jobs:
|
||||
--directory artifacts
|
||||
--output artifacts/portable-update-windows.json
|
||||
--repository "${{ github.repository }}"
|
||||
--gitcode-repository "${{ vars.GITCODE_REPOSITORY }}"
|
||||
--tag "$RELEASE_TAG"
|
||||
- name: Publish release
|
||||
shell: bash
|
||||
@@ -459,3 +461,13 @@ 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
|
||||
Reference in new issue
Block a user