File tree Expand file tree Collapse file tree 1 file changed +27
-2
lines changed
Expand file tree Collapse file tree 1 file changed +27
-2
lines changed Original file line number Diff line number Diff line change 88permissions :
99 contents : write
1010 issues : write
11+ actions : write
1112
1213jobs :
1314 create-release :
7071 - name : Publish
7172 run : |
7273 mkdir output
73- dotnet publish ./src/HydraScript/HydraScript.csproj -r ${{ matrix.config.rid }} -p:Version=${{ needs.create-release.outputs.publish_version }} -o ./output
74+ dotnet publish ./src/HydraScript/HydraScript.csproj -r ${{ matrix.config.rid }} \
75+ -p:Version=${{ needs.create-release.outputs.publish_version }} \
76+ -o ./output
7477 - name : Rename Executable
7578 run : mv ./output/HydraScript${{ matrix.config.rid == 'win-x64' && '.exe' || '' }} ./output/hydrascript_${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
7679 - name : Add asset to a release with GitReleaseManager
8588 name : Publish release
8689 runs-on : ubuntu-latest
8790 needs : upload-release-assets
91+ outputs :
92+ determined_version : ${{ needs.upload-release-assets.outputs.determined_version }}
8893 steps :
8994 - name : Setup .NET
9095 uses : actions/setup-dotnet@v5
@@ -103,4 +108,24 @@ jobs:
103108 with :
104109 token : ${{ secrets.GITHUB_TOKEN }}
105110 repository : ' Stepami/hydrascript'
106- milestone : ${{ needs.upload-release-assets.outputs.determined_version }}
111+ milestone : ${{ needs.upload-release-assets.outputs.determined_version }}
112+
113+ publish-nuget :
114+ name : Publish as dotnet tool to NuGet
115+ runs-on : ubuntu-latest
116+ needs : publish-release
117+ steps :
118+ - name : Checkout
119+ uses : actions/checkout@v5
120+ - name : Setup .NET
121+ uses : actions/setup-dotnet@v5
122+ with :
123+ dotnet-version : 10.0.x
124+ - name : Build
125+ run : dotnet build ./src/HydraScript/HydraScript.csproj -c Release -v n \
126+ /p:Version=${{ needs.publish-release.outputs.determined_version }} \
127+ /p:PublishAot=false /p:PublishSingleFile=false
128+ - name : Publish
129+ run : dotnet nuget push ./src/HydraScript/bin/Release/*.nupkg \
130+ --api-key ${{ secrets.NUGET_API_KEY }} \
131+ --source https://api.nuget.org/v3/index.json
You can’t perform that action at this time.
0 commit comments