7272 versionSpec : ' 0.20.x'
7373 - name : Publish
7474 run : >-
75- dotnet publish ./src/HydraScript/HydraScript.csproj
75+ dotnet publish ./src/HydraScript/HydraScript.csproj -o ./output
7676 -r ${{ matrix.config.rid }}
7777 -p:Version=${{ needs.create-release.outputs.publish_version }}
78- -o ./output
7978 - name : Rename Executable
8079 run : >-
8180 mv ./output/HydraScript${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
8786 repository : ' Stepami/hydrascript'
8887 milestone : ${{ needs.create-release.outputs.determined_version }}
8988 assets : ./output/hydrascript_${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
89+ - name : Pack rid-specific package
90+ run : >-
91+ dotnet pack ./src/HydraScript/HydraScript.csproj -c Release -o ./pack-rid-output -v n
92+ -r ${{ matrix.config.rid }}
93+ -p:Version=${{ needs.create-release.outputs.publish_version }}
94+ - name : NuGet login (OIDC → temp API key)
95+ uses : NuGet/login@v1
96+ id : nuget_login
97+ with :
98+ user : ${{ secrets.NUGET_USER }}
99+ - name : Publish rid-specific package to NuGet
100+ run : >-
101+ dotnet nuget push
102+ ./pack-rid-output/HydraScript.${{ matrix.config.rid }}.${{ needs.create-release.outputs.publish_version }}.nupkg
103+ --skip-duplicate
104+ --api-key ${{ steps.nuget_login.outputs.NUGET_API_KEY }}
105+ --source "https://api.nuget.org/v3/index.json"
90106
91107 publish-release :
92108 name : Publish release
@@ -129,54 +145,25 @@ jobs:
129145 run : >-
130146 dotnet pack ./src/HydraScript/HydraScript.csproj -c Release -o ./pack-output -v n
131147 -p:Version=${{ needs.publish-release.outputs.publish_version }}
132- -p:PublishAot=false
148+ - name : Pack any
149+ run : >-
150+ dotnet pack ./src/HydraScript/HydraScript.csproj -c Release -o ./pack-output -v n
151+ -p:Version=${{ needs.publish-release.outputs.publish_version }}
152+ -r any -p:PublishAot=false
133153 - name : NuGet login (OIDC → temp API key)
134154 uses : NuGet/login@v1
135155 id : nuget_login
136156 with :
137157 user : ${{ secrets.NUGET_USER }}
138- - name : Publish
158+ - name : Publish any
139159 run : >-
140- dotnet nuget push ./pack-output/HydraScript.${{ needs.publish-release.outputs.publish_version }}.nupkg
160+ dotnet nuget push ./pack-output/HydraScript.any. ${{ needs.publish-release.outputs.publish_version }}.nupkg
141161 --skip-duplicate
142162 --api-key ${{ steps.nuget_login.outputs.NUGET_API_KEY }}
143163 --source "https://api.nuget.org/v3/index.json"
144-
145- publish-rid-nuget :
146- name : Publish as runtime-specific dotnet tool to NuGet
147- needs : publish-release
148- strategy :
149- matrix :
150- config :
151- - os : ubuntu-latest
152- rid : linux-x64
153- - os : macos-latest
154- rid : osx-arm64
155- - os : windows-latest
156- rid : win-x64
157- runs-on : ${{ matrix.config.os }}
158- steps :
159- - name : Checkout
160- uses : actions/checkout@v6
161- - name : Setup .NET
162- uses : actions/setup-dotnet@v5
163- with :
164- dotnet-version : 10.0.x
165- - name : Pack
166- run : >-
167- dotnet pack ./src/HydraScript/HydraScript.csproj
168- -c Release -o ./pack-rid-output -v n
169- -r ${{ matrix.config.rid }}
170- -p:Version=${{ needs.publish-release.outputs.publish_version }}
171- - name : NuGet login (OIDC → temp API key)
172- uses : NuGet/login@v1
173- id : nuget_login
174- with :
175- user : ${{ secrets.NUGET_USER }}
176164 - name : Publish
177165 run : >-
178- dotnet nuget push
179- ./pack-rid-output/HydraScript.${{ matrix.config.rid }}.${{ needs.publish-release.outputs.publish_version }}.nupkg
166+ dotnet nuget push ./pack-output/HydraScript.${{ needs.publish-release.outputs.publish_version }}.nupkg
180167 --skip-duplicate
181168 --api-key ${{ steps.nuget_login.outputs.NUGET_API_KEY }}
182169 --source "https://api.nuget.org/v3/index.json"
0 commit comments