@@ -20,13 +20,14 @@ jobs:
20
20
dotnet-version : 8.0.x
21
21
- name : Publish
22
22
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
25
27
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 {} +
30
31
- name : Upload artifacts
31
32
uses : actions/upload-artifact@v3
32
33
with :
55
56
release_name : Release ${{ github.ref }}
56
57
draft : false
57
58
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/*
80
61
81
62
cleanup :
82
63
name : Cleanup
0 commit comments