2121 uses : actions/setup-dotnet@v5
2222 with :
2323 dotnet-version : ${{ env.DOTNET_VERSION }}
24- - name : Install Node.js
25- uses : actions/setup-node@v6
26- with :
27- node-version : 24.x
2824 - name : Set VERSION variable from tag
2925 run : echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
3026 - name : Trusted Publishing Auth
5046 dotnet nuget push src/CHttp.Api/nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key "${{ steps.trustedpublish.outputs.NUGET_API_KEY }}" --skip-duplicate
5147 dotnet nuget push src/CHttpExecutor/nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key "${{ steps.trustedpublish.outputs.NUGET_API_KEY }}" --skip-duplicate
5248 dotnet nuget push src/CHttpServer/CHttpServer/nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key "${{ steps.trustedpublish.outputs.NUGET_API_KEY }}" --skip-duplicate
53- - name : Publish for GitHub
49+ - name : Build GitHub packages
5450 run : |
5551 # CHttp
5652 dotnet publish src/CHttp/CHttp.csproj --configuration ${{ env.CONFIGURATION }} --self-contained --runtime win-x64 -p:Version=${VERSION} -p:PublishSingleFile=true -p:PublishTrimmed=true --framework ${{ env.GH_PACKAGE_VERSION }}
7672 mv src/CHttpExecutor/bin/Release/${{ env.GH_PACKAGE_VERSION }}/win-x64/publish/CHttpExecutor.exe src/CHttpExecutor/bin/Release/${{ env.GH_PACKAGE_VERSION }}/win-x64/publish/chttpexec-win-x64.exe
7773 dotnet publish src/CHttpExecutor/CHttpExecutor.csproj --configuration ${{ env.CONFIGURATION }} --self-contained --runtime linux-x64 -p:Version=${VERSION} -p:PublishSingleFile=true -p:PublishTrimmed=true --framework ${{ env.GH_PACKAGE_VERSION }}
7874 mv src/CHttpExecutor/bin/Release/${{ env.GH_PACKAGE_VERSION }}/linux-x64/publish/CHttpExecutor src/CHttpExecutor/bin/Release/${{ env.GH_PACKAGE_VERSION }}/linux-x64/publish/chttpexec-linux-x64
79- - name : Publish VSCE
80- run : |
81- pushd ./src/VSCodeExt/
82- npm install
83- npm run vsce-deploy ${VERSION}
84- popd
85- - name : Release
75+ - name : Publish to GitHub
8676 uses : softprops/action-gh-release@v3
8777 with :
8878 files : |
9787 src/CHttp/bin/Release/${{ env.GH_PACKAGE_VERSION }}/linux-arm/publish/chttp-linux-arm
9888 src/CHttp/bin/Release/${{ env.GH_PACKAGE_VERSION }}/linux-arm/publish/chttp-linux-arm.pdb
9989 src/CHttp/bin/Release/${{ env.GH_PACKAGE_VERSION }}/linux-x64/publish/chttp-linux-x64-aot
100- src/VSCodeExt/chttp-vsce.vsix
10190 src/CHttpExecutor/bin/Release/${{ env.GH_PACKAGE_VERSION }}/win-x64/publish/chttpexec-win-x64.exe
10291 src/CHttpExecutor/bin/Release/${{ env.GH_PACKAGE_VERSION }}/linux-x64/publish/chttpexec-linux-x64
92+ - name : Build VSCodeExtension dependencies
93+ run : |
94+ dotnet publish src/CHttpExtension -r win-x64 -f net9.0 # .NET 9
95+ - name : Upload CHttpExtension file to artifacts
96+ uses : actions/upload-artifact@v4
97+ with :
98+ name : CHttpExtension-Linux # The name of the artifact bundle
99+ path : src/CHttpExtension/linux-x64/publish/*
103100
104101 cross-compile-windows-aot :
105102 runs-on : windows-latest
@@ -113,16 +110,59 @@ jobs:
113110 run : |
114111 $ver="${{GITHUB.REF_NAME}}" -replace 'v', ''
115112 echo "VERSION=${ver}" >> $env:GITHUB_ENV
116- - name : Publish for GitHub
113+ - name : Build GitHub packages
117114 run : |
118115 # CHttp Aot Windows
119116 dotnet publish src/CHttp/CHttp.csproj --configuration ${{ env.CONFIGURATION }} -p:Version=${{ env.VERSION }} -p:PublishAot=true --runtime win-x64 --framework ${{ env.GH_PACKAGE_VERSION }}
120117 mv src/CHttp/bin/Release/${{ env.GH_PACKAGE_VERSION }}/win-x64/publish/CHttp.exe src/CHttp/bin/Release/${{ env.GH_PACKAGE_VERSION }}/win-x64/publish/chttp-win-x64-aot.exe
121118 dotnet publish src/CHttp/CHttp.csproj --configuration ${{ env.CONFIGURATION }} -p:Version=${{ env.VERSION }} -p:PublishAot=true --runtime win-arm64 --framework ${{ env.GH_PACKAGE_VERSION }}
122119 mv src/CHttp/bin/Release/${{ env.GH_PACKAGE_VERSION }}/win-arm64/publish/CHttp.exe src/CHttp/bin/Release/${{ env.GH_PACKAGE_VERSION }}/win-arm64/publish/chttp-win-arm64-aot.exe
123- - name : Release
120+ - name : Publish to GitHub
124121 uses : softprops/action-gh-release@v3
125122 with :
126123 files : |
127124 src/CHttp/bin/Release/${{ env.GH_PACKAGE_VERSION }}/win-x64/publish/chttp-win-x64-aot.exe
128125 src/CHttp/bin/Release/${{ env.GH_PACKAGE_VERSION }}/win-arm64/publish/chttp-win-arm64-aot.exe
126+ - name : Build VSCodeExtension dependencies
127+ run : |
128+ dotnet publish src/CHttpExtension -r linux-x64 -f net9.0 # .NET 9
129+ - name : Upload CHttpExtension file to artifacts
130+ uses : actions/upload-artifact@v4
131+ with :
132+ name : CHttpExtension-Windows # The name of the artifact bundle
133+ path : src/CHttpExtension/linux-x64/publish/*
134+
135+ build-and-deploy-vscodeextension :
136+ runs-on : ubuntu-latest
137+ needs : [cross-compile-windows-aot, build-and-deploy]
138+ permissions :
139+ contents : write
140+ steps :
141+ - uses : actions/checkout@v6
142+ - name : Install Node.js
143+ uses : actions/setup-node@v6
144+ with :
145+ node-version : 26.x
146+ - name : Set VERSION variable from tag
147+ run : echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
148+ - name : Download Platform Specific Artifacts - Linux
149+ uses : actions/download-artifact@v4
150+ with :
151+ name : CHttpExtension-Linux
152+ path : src/VSCodeExt/src/chttp-linux-x64
153+ - name : Download Platform Specific Artifacts - Windows
154+ uses : actions/download-artifact@v4
155+ with :
156+ name : CHttpExtension-Windows
157+ path : src/VSCodeExt/src/chttp-win32-x64
158+ - name : Publish VSCE
159+ run : |
160+ pushd ./src/VSCodeExt/
161+ npm install
162+ npm run vsce-deploy ${VERSION}
163+ popd
164+ - name : Release
165+ uses : softprops/action-gh-release@v3
166+ with :
167+ files : |
168+ src/VSCodeExt/chttp-vsce.vsix
0 commit comments