ci: ci发布增加windows trimmed并优化macos签名

This commit is contained in:
yaobiao131
2025-08-05 23:46:55 +08:00
parent 5828d85a22
commit 16491ce73c
4 changed files with 102 additions and 8 deletions

View File

@@ -36,6 +36,7 @@ jobs:
matrix:
cpu: [ x64, x86 ]
kind: [ zip ]
trimmed: [ true, false ]
steps:
- name: Checkout
uses: actions/checkout@v4
@@ -57,21 +58,42 @@ jobs:
.\aria2.ps1 ${{ matrix.cpu }}
working-directory: ./script
- name: Package
if: ${{ matrix.trimmed == false }}
run: |
pupnet DownKyi.pupnet.conf --app-version ${{ steps.version.outputs.content }} --kind ${{ matrix.kind }} -r win-${{ matrix.cpu }} -y
working-directory: ./script/pupnet
- name: Package trimmed
if: ${{ matrix.trimmed == true }}
run: |
pupnet DownKyi.pupnet.trimmed.conf --app-version ${{ steps.version.outputs.content }} --kind ${{ matrix.kind }} -r win-${{ matrix.cpu }} -y
mv output/DownKyi-${{ steps.version.outputs.content }}-1.win-${{ matrix.cpu }}.${{ matrix.kind }} output/DownKyi-${{ steps.version.outputs.content }}-1.win-${{ matrix.cpu }}-trimmed.${{ matrix.kind }}
working-directory: ./script/pupnet
- name: Upload build artifacts ${{ matrix.kind }}
uses: actions/upload-artifact@v4
if: ${{ matrix.trimmed == false }}
with:
name: DownKyi-${{ steps.version.outputs.content }}-1.win-${{ matrix.cpu }}.${{ matrix.kind }}
path: script/pupnet/output/DownKyi-${{ steps.version.outputs.content }}-1.win-${{ matrix.cpu }}.${{ matrix.kind }}
- name: Upload build artifacts ${{ matrix.kind }} trimmed
uses: actions/upload-artifact@v4
if: ${{ matrix.trimmed == true }}
with:
name: DownKyi-${{ steps.version.outputs.content }}-1.win-${{ matrix.cpu }}-trimmed.${{ matrix.kind }}
path: script/pupnet/output/DownKyi-${{ steps.version.outputs.content }}-1.win-${{ matrix.cpu }}-trimmed.${{ matrix.kind }}
- name: Release
uses: ncipollo/release-action@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.trimmed == false }}
with:
allowUpdates: true
artifacts: script/pupnet/output/DownKyi-${{ steps.version.outputs.content }}-1.win-${{ matrix.cpu }}.${{ matrix.kind }}
body: ${{ needs.changelog.outputs.release_body }}
- name: Release trimmed
uses: ncipollo/release-action@v1
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.trimmed == true }}
with:
allowUpdates: true
artifacts: script/pupnet/output/DownKyi-${{ steps.version.outputs.content }}-1.win-${{ matrix.cpu }}-trimmed.${{ matrix.kind }}
body: ${{ needs.changelog.outputs.release_body }}
build-linux:
runs-on: ubuntu-22.04
needs: changelog

View File

@@ -22,6 +22,6 @@ cp -a "$PUBLISH_OUTPUT_DIRECTORY" "$APP_NAME/Contents/MacOS"
if [ ! -x $APP_NAME/Contents/MacOS/aria2/aria2c ]; then
chmod +x $APP_NAME/Contents/MacOS/aria2/aria2c
fi
if [ ! -x $APP_NAME/Contents/MacOS/aria2/aria2c ]; then
chmod +x $APP_NAME/Contents/MacOS/aria2/aria2c
if [ ! -x $APP_NAME/Contents/MacOS/ffmpeg/ffmpeg ]; then
chmod +x $APP_NAME/Contents/MacOS/ffmpeg/ffmpeg
fi

View File

@@ -3,13 +3,13 @@ APP_NAME="哔哩下载姬.app"
ENTITLEMENTS="DownKyi.entitlements"
SIGNING_IDENTITY="biao yao" # matches Keychain Access certificate name
find "$APP_NAME/Contents/MacOS/" | while read fname; do
if [[ -f $fname ]]; then
echo "[INFO] Signing $fname"
codesign --force --timestamp --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" "$fname"
find "$APP_NAME/Contents/MacOS/" -type f | while read -r file; do
if file "$file" | grep -q "Mach-O"; then
echo "[INFO] Signing $file"
codesign --force --timestamp --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" "$file"
fi
done
echo "[INFO] Signing app file"
codesign --force --timestamp --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" "$APP_NAME"
codesign --deep --force --timestamp --options=runtime --entitlements "$ENTITLEMENTS" --sign "$SIGNING_IDENTITY" "$APP_NAME"

View File

@@ -0,0 +1,72 @@
AppBaseName = DownKyi
AppFriendlyName = 哔哩下载姬
AppId = cn.bzdrs.downkyi
AppVersionRelease = ${APP_VERSION}
AppShortSummary = 哔哩下载姬哔哩哔哩网站视频下载工具支持批量下载支持8K、HDR、杜比视界提供工具箱音视频提取、去水印等
AppLicenseId = GPL-3.0-or-later
AppLicenseFile = ../../LICENSE
IconFiles = """
icons/logo.icns
icons/logo.16.png
icons/logo.32.png
icons/logo.64.png
icons/logo.128.png
icons/logo.256.png
icons/logo.512.png
icons/logo.1024.png
"""
DesktopFile = app.desktop
# PUBLISHER
PublisherName = yaobiao131
PublisherCopyright = Copyright (C) yaobiao131 2024
PublisherLinkName = Home Page
PublisherLinkUrl = https://github.com/yaobiao131/downkyicore
PublisherEmail = 28655758+yaobiao131@users.noreply.github.com
DotnetProjectPath = ../../
DesktopNoDisplay = false
DesktopTerminal = false
# Package Out
OutputDirectory = output/
PackageName = DownKyi
PrimeCategory = Utility
# AppImage
AppImageVersionOutput = true
DebianRecommends = """
libc6
libgcc1
libgcc-s1
libgssapi-krb5-2
libicu
libssl
libstdc++6
libunwind
zlib1g
"""
# FLATPAK OPTIONS
FlatpakPlatformRuntime = org.freedesktop.Platform
FlatpakPlatformSdk = org.freedesktop.Sdk
FlatpakPlatformVersion = 22.08
; FlatpakFinishArgs = """
; --socket=wayland
; --socket=x11
; --filesystem=host
; --share=network
; """
; FlatpakBuilderArgs =
DotnetPublishArgs = -p:Version=${APP_VERSION} --self-contained true -p:DebugType=None -p:DebugSymbols=false -p:PublishProfile=trimmed
# WINDOWS SETUP OPTIONS
SetupAdminInstall = true
SetupCommandPrompt = PupNet Console
SetupMinWindowsVersion = 6.1sp1
SetupSignTool =
SetupSuffixOutput =
SetupVersionOutput = true