Skip to content

Commit 1e9de2d

Browse files
committed
#216 - release update
1 parent 14726f9 commit 1e9de2d

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
permissions:
99
contents: write
1010
issues: write
11+
actions: write
1112

1213
jobs:
1314
create-release:
@@ -70,7 +71,9 @@ jobs:
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
@@ -85,6 +88,8 @@ jobs:
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

0 commit comments

Comments
 (0)