mirror of
https://github.com/yaobiao131/downkyicore.git
synced 2025-08-10 00:52:31 +00:00
ci: ci发布增加windows trimmed并优化macos签名
This commit is contained in:
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
72
script/pupnet/DownKyi.pupnet.trimmed.conf
Normal file
72
script/pupnet/DownKyi.pupnet.trimmed.conf
Normal 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
|
||||
Reference in New Issue
Block a user