mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-15 07:43:20 +08:00
ci: embed dotnet to mirrorc exe
This commit is contained in:
58
.github/workflows/publish.yml
vendored
58
.github/workflows/publish.yml
vendored
@@ -371,41 +371,83 @@ jobs:
|
||||
mirrorchyan_uploading:
|
||||
if: github.repository_owner == 'babalae' && contains(needs.validate.outputs.version, '-')
|
||||
needs: [validate, build_dist, build_installer]
|
||||
runs-on: macos-latest
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: downloads
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- 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: 📥 Download kachina-builder dev
|
||||
if: ${{ github.event.inputs.kachina-channel == 'dev' }}
|
||||
uses: dawidd6/action-download-artifact@v8
|
||||
with:
|
||||
github_token: ${{secrets.GITHUB_TOKEN}}
|
||||
repo: "YuehaiTeam/kachina-installer"
|
||||
workflow: "build.yml"
|
||||
name: artifact
|
||||
branch: main
|
||||
event: push
|
||||
workflow_conclusion: success
|
||||
|
||||
- name: Extract 7z
|
||||
- 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 ./downloads/BetterGI_Install/BetterGI.Install.*.exe -f "$OUTPUT" -n "Microsoft.DotNet.DesktopRuntime.8" -f "vc_redist.x64.exe" -n "Microsoft.VCRedist.2015+.x64"
|
||||
|
||||
- name: Extract 7z and create zip
|
||||
shell: bash
|
||||
run: |
|
||||
cd downloads/BetterGI_7z
|
||||
7z x BetterGI_v*.7z -oun7z
|
||||
mv ../BetterGI_Metadata/metadata.json ./un7z/BetterGI/.metadata.json
|
||||
7z a -tzip BetterGI.zip un7z/BetterGI -mx=5 -mf=BCJ2 -r -y
|
||||
ls .
|
||||
ls ./un7z/BetterGI
|
||||
choco install wget --no-progress
|
||||
|
||||
- name: Upload Zip
|
||||
uses: MirrorChyan/uploading-action@v1
|
||||
with:
|
||||
filetype: local
|
||||
mirrorchyan_rid: BGI
|
||||
working-directory: downloads/BetterGI_7z/un7z/
|
||||
pick_files: '["BetterGI"]'
|
||||
filename: "downloads/BetterGI_7z/BetterGI.zip"
|
||||
version_name: ${{ needs.validate.outputs.version }}
|
||||
upload_token: ${{ secrets.MirrorChyanUploadToken }}
|
||||
os: win
|
||||
arch: x64
|
||||
|
||||
|
||||
- name: Upload Install.exe
|
||||
if: always()
|
||||
uses: MirrorChyan/uploading-action@v1
|
||||
with:
|
||||
filetype: local
|
||||
mirrorchyan_rid: BGI
|
||||
working-directory: downloads/BetterGI_Install/
|
||||
filename: "BetterGI.Install.*.exe"
|
||||
extra_zip: true
|
||||
filename: "downloads/BetterGI_Install/BetterGI.Install.*.exe"
|
||||
version_name: ${{ needs.validate.outputs.version }}
|
||||
upload_token: ${{ secrets.MirrorChyanUploadToken }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user