mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
build: update build scripts
This commit is contained in:
parent
5f02f95e62
commit
17b0d7ddcb
5 changed files with 16 additions and 11 deletions
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
|
@ -22,7 +22,7 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build -c Release
|
run: dotnet build -c Release
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r win-x64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r win-x64
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
@ -43,7 +43,7 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build -c Release
|
run: dotnet build -c Release
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-x64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-x64
|
||||||
- name: Packing Program
|
- name: Packing Program
|
||||||
run: tar -cvf sourcegit.osx-x64.tar -C publish/ .
|
run: tar -cvf sourcegit.osx-x64.tar -C publish/ .
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
|
@ -66,7 +66,7 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build -c Release
|
run: dotnet build -c Release
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-arm64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r osx-arm64
|
||||||
- name: Packing Program
|
- name: Packing Program
|
||||||
run: tar -cvf sourcegit.osx-arm64.tar -C publish/ .
|
run: tar -cvf sourcegit.osx-arm64.tar -C publish/ .
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
|
@ -89,7 +89,7 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: dotnet build -c Release
|
run: dotnet build -c Release
|
||||||
- name: Publish
|
- name: Publish
|
||||||
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r linux-x64 -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
run: dotnet publish src/SourceGit.csproj -c Release -o publish -r linux-x64
|
||||||
- name: Rename Executable File
|
- name: Rename Executable File
|
||||||
run: mv publish/SourceGit publish/sourcegit
|
run: mv publish/SourceGit publish/sourcegit
|
||||||
- name: Packing Program
|
- name: Packing Program
|
||||||
|
|
|
@ -9,13 +9,13 @@ cp resources/app/App.icns SourceGit.app/Contents/Resources/App.icns
|
||||||
sed "s/SOURCE_GIT_VERSION/${version}/g" resources/app/App.plist > SourceGit.app/Contents/Info.plist
|
sed "s/SOURCE_GIT_VERSION/${version}/g" resources/app/App.plist > SourceGit.app/Contents/Info.plist
|
||||||
|
|
||||||
mkdir -p SourceGit.app/Contents/MacOS
|
mkdir -p SourceGit.app/Contents/MacOS
|
||||||
dotnet publish ../src/SourceGit.csproj -c Release -r osx-arm64 -o SourceGit.app/Contents/MacOS -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
dotnet publish ../src/SourceGit.csproj -c Release -r osx-arm64 -o SourceGit.app/Contents/MacOS
|
||||||
zip sourcegit_${version}.osx-arm64.zip -r SourceGit.app -x "*/*\.dsym/*"
|
zip sourcegit_${version}.osx-arm64.zip -r SourceGit.app -x "*/*\.dsym/*"
|
||||||
|
|
||||||
rm -rf SourceGit.app/Contents/MacOS
|
rm -rf SourceGit.app/Contents/MacOS
|
||||||
|
|
||||||
mkdir -p SourceGit.app/Contents/MacOS
|
mkdir -p SourceGit.app/Contents/MacOS
|
||||||
dotnet publish ../src/SourceGit.csproj -c Release -r osx-x64 -o SourceGit.app/Contents/MacOS -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
dotnet publish ../src/SourceGit.csproj -c Release -r osx-x64 -o SourceGit.app/Contents/MacOS
|
||||||
zip sourcegit_${version}.osx-x64.zip -r SourceGit.app -x "*/*\.dsym/*"
|
zip sourcegit_${version}.osx-x64.zip -r SourceGit.app -x "*/*\.dsym/*"
|
||||||
|
|
||||||
rm -rf SourceGit.app
|
rm -rf SourceGit.app
|
||||||
|
|
|
@ -6,7 +6,7 @@ if (Test-Path SourceGit) {
|
||||||
|
|
||||||
Remove-Item *.zip -Force
|
Remove-Item *.zip -Force
|
||||||
|
|
||||||
dotnet publish ..\src\SourceGit.csproj -c Release -r win-arm64 -o SourceGit -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
dotnet publish ..\src\SourceGit.csproj -c Release -r win-arm64 -o SourceGit
|
||||||
|
|
||||||
Remove-Item SourceGit\*.pdb -Force
|
Remove-Item SourceGit\*.pdb -Force
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ if (Test-Path SourceGit) {
|
||||||
Remove-Item SourceGit -Recurse -Force
|
Remove-Item SourceGit -Recurse -Force
|
||||||
}
|
}
|
||||||
|
|
||||||
dotnet publish ..\src\SourceGit.csproj -c Release -r win-x64 -o SourceGit -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained
|
dotnet publish ..\src\SourceGit.csproj -c Release -r win-x64 -o SourceGit
|
||||||
|
|
||||||
Remove-Item SourceGit\*.pdb -Force
|
Remove-Item SourceGit\*.pdb -Force
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ DOTNET_PROJECT_PATH="../../../src/SourceGit.csproj"
|
||||||
# Additional useful arguments include:
|
# Additional useful arguments include:
|
||||||
# "-p:DebugType=None -p:DebugSymbols=false -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=link"
|
# "-p:DebugType=None -p:DebugSymbols=false -p:PublishSingleFile=true -p:PublishTrimmed=true -p:TrimMode=link"
|
||||||
# Refer: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish
|
# Refer: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-publish
|
||||||
DOTNET_PUBLISH_ARGS="-c Release -p:DebugType=None -p:DebugSymbols=false -p:PublishAot=true -p:PublishTrimmed=true -p:TrimMode=link --self-contained"
|
DOTNET_PUBLISH_ARGS="-c Release -p:DebugType=None -p:DebugSymbols=false"
|
||||||
|
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
|
|
|
@ -10,6 +10,11 @@
|
||||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||||
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
|
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
|
||||||
|
|
||||||
|
<PublishAot>true</PublishAot>
|
||||||
|
<PublishTrimmed>true</PublishTrimmed>
|
||||||
|
<TrimMode>link</TrimMode>
|
||||||
|
<OptimizationPreference>Size</OptimizationPreference>
|
||||||
|
|
||||||
<Product>SourceGit</Product>
|
<Product>SourceGit</Product>
|
||||||
<Description>OpenSource GIT client</Description>
|
<Description>OpenSource GIT client</Description>
|
||||||
<Company>sourcegit-scm</Company>
|
<Company>sourcegit-scm</Company>
|
||||||
|
|
Loading…
Reference in a new issue