@@ -9,6 +9,7 @@ permissions:
99 contents : write
1010 issues : write
1111 actions : write
12+ id-token : write
1213
1314jobs :
1415 create-release :
1920 publish_version : ${{ steps.version_step.outputs.publishVersion }}
2021 steps :
2122 - name : Checkout
22- uses : actions/checkout@v5
23+ uses : actions/checkout@v6
2324 with :
2425 fetch-depth : 0
2526 - name : Setup .NET
@@ -31,11 +32,11 @@ jobs:
3132 echo "majorMinorPatch=$tag" >> $GITHUB_OUTPUT
3233 echo "publishVersion=${tag:1}" >> $GITHUB_OUTPUT
3334 - name : Setup GitReleaseManager
34- uses : gittools/actions/gitreleasemanager/setup@v4.2 .0
35+ uses : gittools/actions/gitreleasemanager/setup@v4.5 .0
3536 with :
3637 versionSpec : ' 0.20.x'
3738 - name : Create release with GitReleaseManager
38- uses : gittools/actions/gitreleasemanager/create@v4.2 .0
39+ uses : gittools/actions/gitreleasemanager/create@v4.5 .0
3940 with :
4041 token : ${{ secrets.GITHUB_TOKEN }}
4142 repository : ' Stepami/hydrascript'
@@ -60,23 +61,27 @@ jobs:
6061 runs-on : ${{ matrix.config.os }}
6162 steps :
6263 - name : Checkout
63- uses : actions/checkout@v5
64+ uses : actions/checkout@v6
6465 - name : Setup .NET
6566 uses : actions/setup-dotnet@v5
6667 with :
6768 dotnet-version : 10.0.x
6869 - name : Setup GitReleaseManager
69- uses : gittools/actions/gitreleasemanager/setup@v4.2 .0
70+ uses : gittools/actions/gitreleasemanager/setup@v4.5 .0
7071 with :
7172 versionSpec : ' 0.20.x'
7273 - name : Publish
73- run : |
74- mkdir output
75- dotnet publish ./src/HydraScript/HydraScript.csproj -r ${{ matrix.config.rid }} -p:Version=${{ needs.create-release.outputs.publish_version }} -o ./output
74+ run : >-
75+ dotnet publish ./src/HydraScript/HydraScript.csproj
76+ -r ${{ matrix.config.rid }}
77+ -p:Version=${{ needs.create-release.outputs.publish_version }}
78+ -o ./output
7679 - name : Rename Executable
77- run : mv ./output/HydraScript${{ matrix.config.rid == 'win-x64' && '.exe' || '' }} ./output/hydrascript_${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
80+ run : >-
81+ mv ./output/HydraScript${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
82+ ./output/hydrascript_${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
7883 - name : Add asset to a release with GitReleaseManager
79- uses : gittools/actions/gitreleasemanager/addasset@v4.2 .0
84+ uses : gittools/actions/gitreleasemanager/addasset@v4.5 .0
8085 with :
8186 token : ${{ secrets.GITHUB_TOKEN }}
8287 repository : ' Stepami/hydrascript'
@@ -93,17 +98,17 @@ jobs:
9398 - name : Setup .NET
9499 uses : actions/setup-dotnet@v5
95100 - name : Setup GitReleaseManager
96- uses : gittools/actions/gitreleasemanager/setup@v4.2 .0
101+ uses : gittools/actions/gitreleasemanager/setup@v4.5 .0
97102 with :
98103 versionSpec : ' 0.20.x'
99104 - name : Publish release with GitReleaseManager
100- uses : gittools/actions/gitreleasemanager/publish@v4.2 .0
105+ uses : gittools/actions/gitreleasemanager/publish@v4.5 .0
101106 with :
102107 token : ${{ secrets.GITHUB_TOKEN }}
103108 repository : ' Stepami/hydrascript'
104109 milestone : ${{ needs.upload-release-assets.outputs.determined_version }}
105110 - name : Close release with GitReleaseManager
106- uses : gittools/actions/gitreleasemanager/close@v4.2 .0
111+ uses : gittools/actions/gitreleasemanager/close@v4.5 .0
107112 with :
108113 token : ${{ secrets.GITHUB_TOKEN }}
109114 repository : ' Stepami/hydrascript'
@@ -115,16 +120,61 @@ jobs:
115120 needs : publish-release
116121 steps :
117122 - name : Checkout
118- uses : actions/checkout@v5
123+ uses : actions/checkout@v6
124+ - name : Setup .NET
125+ uses : actions/setup-dotnet@v5
126+ with :
127+ dotnet-version : 10.0.x
128+ - name : Pack
129+ run : >-
130+ dotnet pack ./src/HydraScript/HydraScript.csproj -c Release -o ./pack-output -v n
131+ -p:Version=${{ needs.publish-release.outputs.publish_version }}
132+ -p:PublishAot=false
133+ - name : NuGet login (OIDC → temp API key)
134+ uses : NuGet/login@v1
135+ id : nuget_login
136+ with :
137+ user : ${{ secrets.NUGET_USER }}
138+ - name : Publish
139+ run : >-
140+ dotnet nuget push ./pack-output/HydraScript.${{ needs.publish-release.outputs.publish_version }}.nupkg
141+ --api-key ${{ steps.nuget_login.outputs.NUGET_API_KEY }}
142+ --source "https://api.nuget.org/v3/index.json"
143+
144+ publish-rid-nuget :
145+ name : Publish as runtime-specific dotnet tool to NuGet
146+ needs : publish-release
147+ strategy :
148+ matrix :
149+ config :
150+ - os : ubuntu-latest
151+ rid : linux-x64
152+ - os : macos-latest
153+ rid : osx-arm64
154+ - os : windows-latest
155+ rid : win-x64
156+ runs-on : ${{ matrix.config.os }}
157+ steps :
158+ - name : Checkout
159+ uses : actions/checkout@v6
119160 - name : Setup .NET
120161 uses : actions/setup-dotnet@v5
121162 with :
122163 dotnet-version : 10.0.x
123- - name : Build
124- run : dotnet build ./src/HydraScript/HydraScript.csproj -c Release -v n `
125- -p:Version=${{ needs.publish-release.outputs.publish_version }} `
126- -p:PublishAot=false -p:PublishSingleFile=false
164+ - name : Pack
165+ run : >-
166+ dotnet pack ./src/HydraScript/HydraScript.csproj
167+ -c Release -o ./pack-rid-output -v n
168+ -r ${{ matrix.config.rid }}
169+ -p:Version=${{ needs.publish-release.outputs.publish_version }}
170+ - name : NuGet login (OIDC → temp API key)
171+ uses : NuGet/login@v1
172+ id : nuget_login
173+ with :
174+ user : ${{ secrets.NUGET_USER }}
127175 - name : Publish
128- run : dotnet nuget push (ls "./src/HydraScript/bin/Release/*.nupkg") `
129- --api-key ${{ secrets.NUGET_API_KEY }} `
176+ run : >-
177+ dotnet nuget push
178+ ./pack-rid-output/HydraScript.${{ needs.publish-release.outputs.publish_version }}.${{ matrix.config.rid }}.nupkg
179+ --api-key ${{ steps.nuget_login.outputs.NUGET_API_KEY }}
130180 --source "https://api.nuget.org/v3/index.json"
0 commit comments