Skip to content

Commit ee6efaf

Browse files
committed
Update github action to create release and upload .exe
1 parent 6285e5a commit ee6efaf

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/dotnet-core.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,21 @@ jobs:
3030
PACKAGE_NAME: dotnet-json
3131
env:
3232
NUGET_KEY: ${{ secrets.NUGET_KEY }}
33+
- name: Create release
34+
if: success() && steps.publish_nuget.output.version != ''
35+
uses: actions/create-release@v1
36+
with:
37+
tag_name: ${{ steps.publish_nuget.output.version }}
38+
release_name: ${{ steps.publish_nuget.output.version }}
39+
body: ""
40+
- name: Publish dotnet-json.exe
41+
if: success() && steps.publish_nuget.outputs.version != ''
42+
run: dotnet publish -c Release -o ./output --self-contained true -r win-x86 -p:PublishSingleFile=true -p:PublishTrimmed=true
43+
- name: Upload dotnet-json.exe release asset
44+
if: success() && steps.publish_nuget.output.version != ''
45+
uses: actions/upload-release-asset@v1
46+
with:
47+
upload_url: ${{ steps.create_release.outputs.upload_url }}
48+
asset_path: ./output/dotnet-json.exe
49+
asset_name: dotnet-json.exe
50+
asset_content_type: application/octet-stream

0 commit comments

Comments
 (0)