@@ -20,13 +20,14 @@ jobs:
2020 dotnet-version : 8.0.x
2121 - name : Publish
2222 run : |
23- dotnet publish -c Release -r linux-x64 --self-contained -p:PublishTrimmed=true -p:PublishSingleFile=true -o app/linux-x64
24- dotnet publish -c Release -r win-x64 --self-contained -p:PublishTrimmed=true -p:PublishSingleFile=true -o app/win-x64
23+ dotnet publish -c Release -r linux-x64 --self-contained -p:PublishTrimmed=true -p:PublishSingleFile=true -o app/linux-x64-with-runtime
24+ dotnet publish -c Release -r win-x64 --self-contained -p:PublishTrimmed=true -p:PublishSingleFile=true -o app/win-x64-with-runtime
25+ dotnet publish -c Release -r linux-x64 --no-self-contained -p:PublishReadyToRun=true -p:PublishSingleFile=true -o app/linux-x64-without-runtime
26+ dotnet publish -c Release -r win-x64 --no-self-contained -p:PublishReadyToRun=true -p:PublishSingleFile=true -o app/win-x64-without-runtime
2527 cd app
26- mv linux-x64/appsettings.Example.json linux-x64/appsettings.json
27- zip -r ${{ github.ref_name }}-linux-x64.zip linux-x64/*
28- mv win-x64/appsettings.Example.json win-x64/appsettings.json
29- zip -r ${{ github.ref_name }}-win-x64.zip win-x64/*
28+ find . -type f -name 'appsettings.Example.json' -execdir mv {} appsettings.json \;
29+ find . -maxdepth 1 -type d ! -name '.' | xargs -I {} sh -c 'cd "{}" && zip -r "../${{ github.ref_name }}-$(basename {}).zip" *'
30+ find . -maxdepth 1 -type d ! -name '.' -exec rm -rf {} +
3031 - name : Upload artifacts
3132 uses : actions/upload-artifact@v3
3233 with :
5556 release_name : Release ${{ github.ref }}
5657 draft : false
5758 prerelease : true
58-
59- - name : Upload Release Asset for Linux-x64
60- id : upload_linux
61- uses : actions/upload-release-asset@v1
62- env :
63- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64- with :
65- upload_url : ${{ steps.create_release.outputs.upload_url }}
66- asset_path : app/${{ github.ref_name }}-linux-x64.zip
67- asset_name : ${{ github.ref_name }}-linux-x64.zip
68- asset_content_type : application/zip
69-
70- - name : Upload Release Asset for Windows-x64
71- id : upload_win
72- uses : actions/upload-release-asset@v1
73- env :
74- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
75- with :
76- upload_url : ${{ steps.create_release.outputs.upload_url }}
77- asset_path : app/${{ github.ref_name }}-win-x64.zip
78- asset_name : ${{ github.ref_name }}-win-x64.zip
79- asset_content_type : application/zip
59+ files : |
60+ app/*
8061
8162 cleanup :
8263 name : Cleanup
0 commit comments