ci: update mirrorc release pipeline

This commit is contained in:
xyToki
2025-06-22 16:18:17 +08:00
committed by GitHub
parent 64c9f717aa
commit e0aa5f0821
2 changed files with 44 additions and 19 deletions

View File

@@ -6,8 +6,8 @@ on:
types: [released]
jobs:
mirrorchyan_7z:
runs-on: macos-latest
mirrorchyan:
runs-on: windows-latest
steps:
- name: 📥 Download release
uses: robinraju/release-downloader@v1.8
@@ -15,11 +15,45 @@ jobs:
latest: true
fileName: "*"
- name: Extract 7z
- name: 📥 Download kachina-builder release
if: ${{ github.event.inputs.kachina-channel == 'release' }}
uses: robinraju/release-downloader@v1.8
with:
repository: "YuehaiTeam/kachina-installer"
latest: true
fileName: "kachina-builder.exe"
- name: Embed Dotnet and VCRedist
shell: bash
run: |
# dotnet
VERSION_URL="https://builds.dotnet.microsoft.com/dotnet/WindowsDesktop/8.0/latest.version"
VERSION=$(curl -fsSL "$VERSION_URL" | tr -d '\r\n')
if [ -z "$VERSION" ]; then
echo "Cannot get the latest version from $VERSION_URL"
exit 1
fi
INSTALLER_URL="https://builds.dotnet.microsoft.com/dotnet/WindowsDesktop/${VERSION}/windowsdesktop-runtime-${VERSION}-win-x64.exe"
OUTPUT="windowsdesktop-runtime-${VERSION}-win-x64.exe"
echo "Downloading Windows Desktop Runtime version $VERSION from $INSTALLER_URL"
curl -fSL -o "$OUTPUT" "$INSTALLER_URL"
# vcredist
echo "Downloading VCRedist"
curl -fSL -o "vc_redist.x64.exe" "https://aka.ms/vs/17/release/vc_redist.x64.exe"
# embed
echo "Embedding runtimes"
./kachina-builder.exe append -o ./BetterGI.Install.*.exe -f "$OUTPUT" -n "Microsoft.DotNet.DesktopRuntime.8" -f "vc_redist.x64.exe" -n "Microsoft.VCRedist.2015+.x64"
./kachina-builder.exe extract -i ./BetterGI.Install.*.exe -f ./metadata.json -n "\0META"
- name: Extract 7z and create zip
shell: bash
run: |
7z a -tzip BetterGI.Install.zip ./BetterGI.Install.*.exe -mx=1 -r -y
choco install wget --no-progress
7z x BetterGI_v*.7z -oun7z
mv ./BetterGI.Metadata.json ./un7z/BetterGI/.metadata.json
mv ./metadata.json ./un7z/BetterGI/.metadata.json
cd un7z
7z a -tzip ../BetterGI.zip ./BetterGI -mx=5 -r -y
- name: Determine version number
id: get-version
@@ -38,25 +72,17 @@ jobs:
with:
filetype: local
mirrorchyan_rid: BGI
working-directory: ./un7z/
pick_files: '["BetterGI"]'
filename: "downloads/BetterGI_7z/BetterGI.zip"
version_name: ${{ steps.get-version.outputs.version }}
upload_token: ${{ secrets.MirrorChyanUploadToken }}
os: win
arch: x64
mirrorchyan_exe:
runs-on: macos-latest
steps:
- uses: MirrorChyan/uploading-action@v1
- name: Upload Exe
uses: MirrorChyan/uploading-action@v1
with:
filetype: latest-release
filename: "BetterGI.Install.*.exe"
extra_zip: true
filetype: local
mirrorchyan_rid: BGI
github_token: ${{ secrets.GITHUB_TOKEN }}
owner: babalae
repo: better-genshin-impact
filename: "BetterGI.Install.zip"
version_name: ${{ steps.get-version.outputs.version }}
upload_token: ${{ secrets.MirrorChyanUploadToken }}

View File

@@ -437,7 +437,6 @@ jobs:
arch: x64
- name: Upload Install.exe
if: always()
uses: MirrorChyan/uploading-action@v1
with:
filetype: local