Merge pull request #151 from whitecat346/chore/log #284
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build-AppImage: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.x' | |
- name: Dependency | |
run: | | |
dotnet tool install -g KuiperZone.PupNet | |
sudo apt-get update | |
sudo apt-get install fuse | |
echo $(pwd) >> "$GITHUB_PATH" | |
curl -sL https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -o appimagetool-x86_64.AppImage | |
chmod +x appimagetool-x86_64.AppImage | |
- name: Build-AppImage | |
run: | | |
cd ./PCL.Neo | |
pupnet --runtime linux-x64 --kind appimage -o PCL.Neo.linux.x64.AppImage -y --app-version 1.0.0 | |
pupnet --runtime linux-arm64 --kind appimage -o PCL.Neo.linux.arm64.AppImage -y --app-version 1.0.0 | |
- name: UploadArtifacts linux.arm64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux.arm64 | |
path: | | |
PCL.Neo/Deploy/OUT/PCL.Neo.linux.arm64.AppImage | |
- name: UploadArtifacts linux.x64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux.x64 | |
path: | | |
PCL.Neo/Deploy/OUT/PCL.Neo.linux.x64.AppImage | |
build-MacOsApp: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.x' | |
- name: Dependency | |
run: | | |
dotnet tool install -g KuiperZone.PupNet | |
sudo apt-get update | |
sudo apt-get install fuse | |
- name: Build-MacOsApp | |
run: | | |
sudo su | |
sh ./mac-publish-assets/package-mac.sh | |
cd ./mac-publish-assets/x64 | |
zip -9 -r PCL.Neo.osx.mac.x64.app.zip PCL.Neo.app | |
cd ../arm64 | |
zip -9 -r PCL.Neo.osx.mac.arm64.app.zip PCL.Neo.app | |
- name: UploadArtifacts osx.mac.arm64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: osx.mac.arm64 | |
path: | | |
mac-publish-assets/arm64/PCL.Neo.osx.mac.arm64.app.zip | |
- name: UploadArtifacts osx.mac.x64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: osx.mac.x64 | |
path: | | |
mac-publish-assets/x64/PCL.Neo.osx.mac.x64.app.zip | |
build-WinExe: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '9.x' | |
- name: Dependency | |
run: | | |
dotnet tool install -g KuiperZone.PupNet | |
sudo apt-get update | |
sudo apt-get install fuse | |
- name: Build-WinExe | |
run: | | |
cd ./PCL.Neo | |
sudo su | |
dotnet publish -r win-x86 --self-contained true -p:PublishSingleFile=true -p:TrimMode=copyused | |
dotnet publish -r win-x64 --self-contained true -p:PublishSingleFile=true -p:TrimMode=copyused | |
dotnet publish -r win-arm64 --self-contained true -p:PublishSingleFile=true -p:TrimMode=copyused | |
mv ./bin/Release/net9.0/win-x86/publish/PCL.Neo.exe ./bin/Release/net9.0/win-x86/publish/PCL.Neo.win.x86.exe | |
mv ./bin/Release/net9.0/win-x64/publish/PCL.Neo.exe ./bin/Release/net9.0/win-x64/publish/PCL.Neo.win.x64.exe | |
mv ./bin/Release/net9.0/win-arm64/publish/PCL.Neo.exe ./bin/Release/net9.0/win-arm64/publish/PCL.Neo.win.arm64.exe | |
cd ./bin/Release/net9.0/ | |
cd ./win-x86/ | |
zip -9 -r "../PCL.Neo.win.x86.zip" "./publish" | |
cd ../ | |
cd ./win-x64/ | |
zip -9 -r "../PCL.Neo.win.x64.zip" "./publish" | |
cd ../ | |
cd ./win-arm64/ | |
zip -9 -r "../PCL.Neo.win.arm64.zip" "./publish" | |
- name: UploadArtifacts win.x64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win.x64 | |
path: | | |
PCL.Neo/bin/Release/net9.0/PCL.Neo.win.x64.zip | |
- name: UploadArtifacts win.x86 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win.x86 | |
path: | | |
PCL.Neo/bin/Release/net9.0/PCL.Neo.win.x86.zip | |
- name: UploadArtifacts win.arm64 | |
uses: actions/upload-artifact@v4 | |
with: | |
name: win.arm64 | |
path: | | |
PCL.Neo/bin/Release/net9.0/PCL.Neo.win.arm64.zip |