@@ -89,12 +89,21 @@ jobs:
8989 - name : Run .NET tests
9090 run : dotnet test --verbosity normal
9191
92- - name : Pester tests
92+ - name : Run Pester tests
9393 shell : pwsh
9494 run : |
9595 Invoke-Pester -Path ./PsGraph.Pester.Tests/
9696
97- - name : psgallery publish
97+ - name : dotnet publish PowerShell module
98+ run : |
99+ if [ "${{ github.event.release.prerelease }}" = "true" ]; then
100+ dotnet publish -c Debug -o "./PSQuickGraph"
101+ else
102+ dotnet publish -c Release -o "./PSQuickGraph"
103+ fi
104+
105+ - name : Publish PowerShell module to PSGallery
106+ shell : pwsh
98107 run : |
99108 Publish-Module -Path "./PSQuickGraph" -NuGetApiKey ${{ secrets.PS_GALLERY_SECRET }}
100109
@@ -129,25 +138,25 @@ jobs:
129138 NUGET_API_KEY : ${{ secrets.NUGET_API_KEY }}
130139
131140 # --- Commit manifest changes ---
132- - name : Commit and push updated manifest
133- if : success()
134- env :
135- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
136- run : |
137- git config user.name "github-actions[bot]"
138- git config user.email "github-actions[bot]@users.noreply.github.com"
139- SOURCE_BRANCH="${{ github.event.release.target_commitish }}"
140- if [ -z "$SOURCE_BRANCH" ]; then
141- echo "Could not determine source branch. Exiting."
142- exit 1
143- fi
144- if [[ "$SOURCE_BRANCH" =~ ^[0-9a-f]{40}$ ]]; then
145- echo "Commitish is a SHA, not a branch name. Aborting."
146- exit 1
147- fi
148- git fetch origin "$SOURCE_BRANCH"
149- git switch "$SOURCE_BRANCH"
150- git pull origin "$SOURCE_BRANCH"
151- git add ./PSQuickGraph/*.psd1
152- git commit -m "ci: update module version to ${{ steps.set_version.outputs.version }}" || echo "Nothing to commit"
153- git push origin "$SOURCE_BRANCH"
141+ # - name: Commit and push updated manifest
142+ # if: success()
143+ # env:
144+ # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
145+ # run: |
146+ # git config user.name "github-actions[bot]"
147+ # git config user.email "github-actions[bot]@users.noreply.github.com"
148+ # SOURCE_BRANCH="${{ github.event.release.target_commitish }}"
149+ # if [ -z "$SOURCE_BRANCH" ]; then
150+ # echo "Could not determine source branch. Exiting."
151+ # exit 1
152+ # fi
153+ # if [[ "$SOURCE_BRANCH" =~ ^[0-9a-f]{40}$ ]]; then
154+ # echo "Commitish is a SHA, not a branch name. Aborting."
155+ # exit 1
156+ # fi
157+ # git fetch origin "$SOURCE_BRANCH"
158+ # git switch "$SOURCE_BRANCH"
159+ # git pull origin "$SOURCE_BRANCH"
160+ # git add ./PSQuickGraph/*.psd1
161+ # git commit -m "ci: update module version to ${{ steps.set_version.outputs.version }}" || echo "Nothing to commit"
162+ # git push origin "$SOURCE_BRANCH"
0 commit comments