Skip to content

Commit 66971e2

Browse files
committed
fix(just rewrite): todo
1 parent 435c7b3 commit 66971e2

File tree

1 file changed

+107
-64
lines changed

1 file changed

+107
-64
lines changed

.github/workflows/dev.yml

Lines changed: 107 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ env:
2525
GITHUB_USERNAME: "Phil-NHS"
2626

2727

28-
NUPKG_OUTPUT_PATH: ${{ runner.temp }}/CICDPackageLocation
28+
NUPKG_OUTPUT_PATH: ${{ github.workspace }}/CICDPackageLocation
2929

3030
IS_LOCAL_DEV: false
3131
USE_BCL_PROJECT_REFERENCE: false
3232

33-
BCL_Local_Source: ${{ runner.temp }}/CICDPackageLocation
33+
BCL_Local_Source: ${{ github.workspace }}/CICDPackageLocation
3434
BCL_Source: "https://nuget.pkg.github.com/phil-nhs/index.json"
3535

3636

@@ -185,7 +185,6 @@ jobs:
185185
echo "Commit Type/Scope: $(git log -1 --pretty=%s $GITHUB_SHA | cut -d':' -f1)"
186186
187187

188-
189188
build-bcl-dev-package-and-publish:
190189
if: success() #not needed but being explicit
191190
needs: [generate-dev-semantic-version, commitlint, gitguardian-scan,Unit-Tests,E2E-Tests, branch-name-check]
@@ -203,7 +202,6 @@ jobs:
203202

204203
- name: Debug Version Output BCL var
205204
run: echo "Extracted Version $BCL_VERSION "
206-
#qqqq are we a commit behind check that we use the new generated version of the package
207205

208206
# the restore cant be given env values to override values like it can in build so we need to remove this file so we use the env values
209207
- name: Remove Local PackageSettings (CI Only)
@@ -213,84 +211,129 @@ jobs:
213211
214212
- name: Replace local environment variable in nuget config because cant provide it as a parameter
215213
run: sed -i "s|%LocalPackagePath%|$BCL_Local_Source|g" nuget.config
216-
217-
218-
219-
- name: Show updated nuget.config
220-
run: cat nuget.config
221-
222-
#qqqq ask binon about this
214+
223215
- name: Clean lock files because the newly generated package file will superseed the locks
224216
run: |
225217
find . -name "packages.lock.json" -type f -exec rm -f {} \;
226218
227-
# - name: Restore NuGet Packages for Specifically the BCL Package Library Project
228-
# run: dotnet restore Package.BlazorComponentLibrary/Package.BlazorComponentLibrary.csproj
229-
230-
- name: echo qqqq here is the issue
231-
run: echo "qqqq here is the issue"
232-
233-
- name: Debug VersionInfo.cs
234-
run: |
235-
echo "before we build the project where could it be getting this value from? qqqq"
236-
cat Package.BlazorComponentLibrary/BCLVersion/VersionInfo.cs
237-
238-
239-
# why qqqq were not doing anything with the client here
240-
# - name: Restore NuGet Packages for Specifically the ClientProject
241-
# run: dotnet restore TestHostPrerenderWASM/TestHostPrerenderWASM.Client/TestHostPrerenderWASM.Client.csproj
242-
243-
# - name: Debug package references
244-
# run: |
245-
# echo "Checking package references in client project..."
246-
# dotnet list TestHostPrerenderWASM/TestHostPrerenderWASM.Client/TestHostPrerenderWASM.Client.csproj package
247-
248-
- name: Build and Pack BlazorComponentLibrary
219+
- name: Build BlazorComponentLibrary (it publishes on build)
249220
run: |
250221
dotnet build Package.BlazorComponentLibrary -c Release \
251222
/p:BCLVersion=$BCL_VERSION \
252223
/p:NupkgOutputPath=$NUPKG_OUTPUT_PATH \
253224
/p:UseBCLProjectReference=$USE_BCL_PROJECT_REFERENCE
254-
255-
#qqqq this works
256-
- name: Debug VersionInfo.cs
225+
226+
- name: Publish to GitHub DEV BCL Packages
257227
run: |
258-
cat Package.BlazorComponentLibrary/BCLVersion/VersionInfo.cs
228+
dotnet nuget push "$BCL_Local_Source/TELBlazorComponentLibrary.GitPageBlazorWasm.*.nupkg" \
229+
--source "https://nuget.pkg.github.com/phil-nhs/index.json" \
230+
--api-key ${{ secrets.PACKAGES_TOKEN }} \
231+
--skip-duplicate
232+
# build-bcl-dev-package-and-publish:
233+
# if: success() #not needed but being explicit
234+
# needs: [generate-dev-semantic-version, commitlint, gitguardian-scan,Unit-Tests,E2E-Tests, branch-name-check]
235+
# runs-on: ubuntu-latest
236+
# env:
237+
# BCL_VERSION: ${{ needs.generate-dev-semantic-version.outputs.dev-package-version }}
238+
# steps:
239+
# - name: Checkout Code
240+
# uses: actions/checkout@v4
241+
242+
# - name: Setup .NET
243+
# uses: actions/setup-dotnet@v4
244+
# with:
245+
# global-json-file: global.json
246+
247+
# - name: Debug Version Output BCL var
248+
# run: echo "Extracted Version $BCL_VERSION "
249+
# #qqqq are we a commit behind check that we use the new generated version of the package
250+
251+
# # the restore cant be given env values to override values like it can in build so we need to remove this file so we use the env values
252+
# - name: Remove Local PackageSettings (CI Only)
253+
# run: |
254+
# rm -f PackageSettings.props.local
255+
# ls
256+
257+
# - name: Replace local environment variable in nuget config because cant provide it as a parameter
258+
# run: sed -i "s|%LocalPackagePath%|$BCL_Local_Source|g" nuget.config
259+
260+
261+
262+
# - name: Show updated nuget.config
263+
# run: cat nuget.config
264+
265+
# #qqqq ask binon about this
266+
# - name: Clean lock files because the newly generated package file will superseed the locks
267+
# run: |
268+
# find . -name "packages.lock.json" -type f -exec rm -f {} \;
259269

260-
# - name: build whole solution now package built qqqqq
270+
# # - name: Restore NuGet Packages for Specifically the BCL Package Library Project
271+
# # run: dotnet restore Package.BlazorComponentLibrary/Package.BlazorComponentLibrary.csproj
272+
273+
# - name: echo qqqq here is the issue
274+
# run: echo "qqqq here is the issue"
275+
276+
# - name: Debug VersionInfo.cs
261277
# run: |
262-
# dotnet build GitPageBlazorWASM.sln -c Release \
278+
# echo "before we build the project where could it be getting this value from? qqqq"
279+
# cat Package.BlazorComponentLibrary/BCLVersion/VersionInfo.cs
280+
281+
282+
# # why qqqq were not doing anything with the client here
283+
# # - name: Restore NuGet Packages for Specifically the ClientProject
284+
# # run: dotnet restore TestHostPrerenderWASM/TestHostPrerenderWASM.Client/TestHostPrerenderWASM.Client.csproj
285+
286+
# # - name: Debug package references
287+
# # run: |
288+
# # echo "Checking package references in client project..."
289+
# # dotnet list TestHostPrerenderWASM/TestHostPrerenderWASM.Client/TestHostPrerenderWASM.Client.csproj package
290+
291+
# - name: Build and Pack BlazorComponentLibrary
292+
# run: |
293+
# dotnet build Package.BlazorComponentLibrary -c Release \
263294
# /p:BCLVersion=$BCL_VERSION \
264295
# /p:NupkgOutputPath=$NUPKG_OUTPUT_PATH \
265-
# /p:UseBCLProjectReference=$USE_BCL_PROJECT_REFERENCE \
266-
# /p:LocalPackagePath=$BCL_Local_Source \
267-
# /p:GhPageRelease=false
296+
# /p:UseBCLProjectReference=$USE_BCL_PROJECT_REFERENCE
297+
298+
# #qqqq this works
299+
# - name: Debug VersionInfo.cs
300+
# run: |
301+
# cat Package.BlazorComponentLibrary/BCLVersion/VersionInfo.cs
302+
303+
# # - name: build whole solution now package built qqqqq
304+
# # run: |
305+
# # dotnet build GitPageBlazorWASM.sln -c Release \
306+
# # /p:BCLVersion=$BCL_VERSION \
307+
# # /p:NupkgOutputPath=$NUPKG_OUTPUT_PATH \
308+
# # /p:UseBCLProjectReference=$USE_BCL_PROJECT_REFERENCE \
309+
# # /p:LocalPackagePath=$BCL_Local_Source \
310+
# # /p:GhPageRelease=false
268311

269-
# - name: List Created Package
270-
# run: ls -l $BCL_Local_Source
312+
# # - name: List Created Package
313+
# # run: ls -l $BCL_Local_Source
271314

272-
# - name: echo path for artifact
273-
# run: echo "${{ env.NUPKG_OUTPUT_PATH }}"
315+
# # - name: echo path for artifact
316+
# # run: echo "${{ env.NUPKG_OUTPUT_PATH }}"
274317

275-
- name: echo hint information about restore
276-
run: echo "if a hash error occurs for the bcl package the version number may need increasing or a clean step, hiy only does latest for packages no prerelease like nuget so version filtering is needed by consumers"
318+
# - name: echo hint information about restore
319+
# run: echo "if a hash error occurs for the bcl package the version number may need increasing or a clean step, hiy only does latest for packages no prerelease like nuget so version filtering is needed by consumers"
277320

278-
# qqqqq how is this using a local variable
279-
- name: DEBUGGING Publish to GitHub DEV BCL Packages
280-
run: |
281-
echo "Listing .nupkg files in the directory:"
282-
ls $BCL_Local_Source/*.nupkg
283-
echo "Unzipping .nupkg to inspect contents"
284-
unzip -l "$BCL_Local_Source/TELBlazorComponentLibrary.GitPageBlazorWasm.*.nupkg" # List contents of the .nupkg file
285-
echo "Displaying the contents of bclversion.txt"
286-
cat "Package.BlazorComponentLibrary/wwwroot/bclversion.txt"
287-
288-
- name: Publish to GitHub DEV BCL Packages
289-
run: |
290-
dotnet nuget push "$BCL_Local_Source/TELBlazorComponentLibrary.GitPageBlazorWasm.*.nupkg" \
291-
--source "https://nuget.pkg.github.com/phil-nhs/index.json" \
292-
--api-key ${{ secrets.PACKAGES_TOKEN }} \
293-
--skip-duplicate
321+
# # qqqqq how is this using a local variable
322+
# - name: DEBUGGING Publish to GitHub DEV BCL Packages
323+
# run: |
324+
# echo "Listing .nupkg files in the directory:"
325+
# ls $BCL_Local_Source/*.nupkg
326+
# echo "Unzipping .nupkg to inspect contents"
327+
# unzip -l "$BCL_Local_Source/TELBlazorComponentLibrary.GitPageBlazorWasm.*.nupkg" # List contents of the .nupkg file
328+
# echo "Displaying the contents of bclversion.txt"
329+
# cat "Package.BlazorComponentLibrary/wwwroot/bclversion.txt"
330+
331+
# - name: Publish to GitHub DEV BCL Packages
332+
# run: |
333+
# dotnet nuget push "$BCL_Local_Source/TELBlazorComponentLibrary.GitPageBlazorWasm.*.nupkg" \
334+
# --source "https://nuget.pkg.github.com/phil-nhs/index.json" \
335+
# --api-key ${{ secrets.PACKAGES_TOKEN }} \
336+
# --skip-duplicate
294337

295338

296339
Make-Blazor-Wiki-Artifact-Trigger-GH-Pages-In-BlazorWasmTest:

0 commit comments

Comments
 (0)