From 9b7c87989cccd8a0178b939ee3aea4649904ea36 Mon Sep 17 00:00:00 2001 From: eosfor <9363027+eosfor@users.noreply.github.com> Date: Tue, 29 Jul 2025 16:47:27 -0700 Subject: [PATCH 1/4] fixing issues :D --- .github/workflows/publish.yml | 45 ++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9c39450..ecf1d43 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -95,6 +95,7 @@ jobs: Invoke-Pester -Path ./PsGraph.Pester.Tests/ - name: psgallery publish + shell: pwsh run: | Publish-Module -Path "./PSQuickGraph" -NuGetApiKey ${{ secrets.PS_GALLERY_SECRET }} @@ -129,25 +130,25 @@ jobs: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} # --- Commit manifest changes --- - - name: Commit and push updated manifest - if: success() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - SOURCE_BRANCH="${{ github.event.release.target_commitish }}" - if [ -z "$SOURCE_BRANCH" ]; then - echo "Could not determine source branch. Exiting." - exit 1 - fi - if [[ "$SOURCE_BRANCH" =~ ^[0-9a-f]{40}$ ]]; then - echo "Commitish is a SHA, not a branch name. Aborting." - exit 1 - fi - git fetch origin "$SOURCE_BRANCH" - git switch "$SOURCE_BRANCH" - git pull origin "$SOURCE_BRANCH" - git add ./PSQuickGraph/*.psd1 - git commit -m "ci: update module version to ${{ steps.set_version.outputs.version }}" || echo "Nothing to commit" - git push origin "$SOURCE_BRANCH" \ No newline at end of file + # - name: Commit and push updated manifest + # if: success() + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # run: | + # git config user.name "github-actions[bot]" + # git config user.email "github-actions[bot]@users.noreply.github.com" + # SOURCE_BRANCH="${{ github.event.release.target_commitish }}" + # if [ -z "$SOURCE_BRANCH" ]; then + # echo "Could not determine source branch. Exiting." + # exit 1 + # fi + # if [[ "$SOURCE_BRANCH" =~ ^[0-9a-f]{40}$ ]]; then + # echo "Commitish is a SHA, not a branch name. Aborting." + # exit 1 + # fi + # git fetch origin "$SOURCE_BRANCH" + # git switch "$SOURCE_BRANCH" + # git pull origin "$SOURCE_BRANCH" + # git add ./PSQuickGraph/*.psd1 + # git commit -m "ci: update module version to ${{ steps.set_version.outputs.version }}" || echo "Nothing to commit" + # git push origin "$SOURCE_BRANCH" \ No newline at end of file From 83ef06988b298fb77232c873867d84e6180ef37e Mon Sep 17 00:00:00 2001 From: eosfor <9363027+eosfor@users.noreply.github.com> Date: Tue, 29 Jul 2025 16:56:01 -0700 Subject: [PATCH 2/4] still fixing issues --- .github/workflows/publish.yml | 56 ++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index ecf1d43..faeab17 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -89,12 +89,20 @@ jobs: - name: Run .NET tests run: dotnet test --verbosity normal - - name: Pester tests + - name: Run Pester tests shell: pwsh run: | Invoke-Pester -Path ./PsGraph.Pester.Tests/ - - name: psgallery publish + - name: dotnet publish PowerShell module + run: | + if [ "${{ github.event.release.prerelease }}" = "true" ]; then + dotnet publish -c Debug -o "./PSQuickGraph" + else + dotnet publish -c Release -o "./PSQuickGraph" + fi + + - name: Publish PowerShell module to PSGallery shell: pwsh run: | Publish-Module -Path "./PSQuickGraph" -NuGetApiKey ${{ secrets.PS_GALLERY_SECRET }} @@ -130,25 +138,25 @@ jobs: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} # --- Commit manifest changes --- - # - name: Commit and push updated manifest - # if: success() - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # run: | - # git config user.name "github-actions[bot]" - # git config user.email "github-actions[bot]@users.noreply.github.com" - # SOURCE_BRANCH="${{ github.event.release.target_commitish }}" - # if [ -z "$SOURCE_BRANCH" ]; then - # echo "Could not determine source branch. Exiting." - # exit 1 - # fi - # if [[ "$SOURCE_BRANCH" =~ ^[0-9a-f]{40}$ ]]; then - # echo "Commitish is a SHA, not a branch name. Aborting." - # exit 1 - # fi - # git fetch origin "$SOURCE_BRANCH" - # git switch "$SOURCE_BRANCH" - # git pull origin "$SOURCE_BRANCH" - # git add ./PSQuickGraph/*.psd1 - # git commit -m "ci: update module version to ${{ steps.set_version.outputs.version }}" || echo "Nothing to commit" - # git push origin "$SOURCE_BRANCH" \ No newline at end of file + - name: Commit and push updated manifest + if: success() + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + SOURCE_BRANCH="${{ github.event.release.target_commitish }}" + if [ -z "$SOURCE_BRANCH" ]; then + echo "Could not determine source branch. Exiting." + exit 1 + fi + if [[ "$SOURCE_BRANCH" =~ ^[0-9a-f]{40}$ ]]; then + echo "Commitish is a SHA, not a branch name. Aborting." + exit 1 + fi + git fetch origin "$SOURCE_BRANCH" + git switch "$SOURCE_BRANCH" + git pull origin "$SOURCE_BRANCH" + git add ./PSQuickGraph/*.psd1 + git commit -m "ci: update module version to ${{ steps.set_version.outputs.version }}" || echo "Nothing to commit" + git push origin "$SOURCE_BRANCH" \ No newline at end of file From 602a159c84bc73b8da64a9663ce11b0744b0cc7c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 29 Jul 2025 23:58:10 +0000 Subject: [PATCH 3/4] ci: update module version to 2.3.1 --- PSQuickGraph/PSQuickGraph.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PSQuickGraph/PSQuickGraph.psd1 b/PSQuickGraph/PSQuickGraph.psd1 index b64a33d..c2c2623 100644 --- a/PSQuickGraph/PSQuickGraph.psd1 +++ b/PSQuickGraph/PSQuickGraph.psd1 @@ -94,7 +94,7 @@ AliasesToExport = @() PrivateData = @{ PSData = @{ -Prerelease = 'beta6' +Prerelease = 'prerelease' # Tags applied to this module. These help with module discovery in online galleries. # Tags = @() From 2d1d5c7a15c4ec6d0ba122ccb8c210c0b98282ab Mon Sep 17 00:00:00 2001 From: eosfor <9363027+eosfor@users.noreply.github.com> Date: Tue, 29 Jul 2025 17:01:05 -0700 Subject: [PATCH 4/4] perhaps i do not want to puch version chnages back for now. --- .github/workflows/publish.yml | 44 +++++++++++++++++------------------ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index faeab17..2e5948a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -138,25 +138,25 @@ jobs: NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} # --- Commit manifest changes --- - - name: Commit and push updated manifest - if: success() - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - SOURCE_BRANCH="${{ github.event.release.target_commitish }}" - if [ -z "$SOURCE_BRANCH" ]; then - echo "Could not determine source branch. Exiting." - exit 1 - fi - if [[ "$SOURCE_BRANCH" =~ ^[0-9a-f]{40}$ ]]; then - echo "Commitish is a SHA, not a branch name. Aborting." - exit 1 - fi - git fetch origin "$SOURCE_BRANCH" - git switch "$SOURCE_BRANCH" - git pull origin "$SOURCE_BRANCH" - git add ./PSQuickGraph/*.psd1 - git commit -m "ci: update module version to ${{ steps.set_version.outputs.version }}" || echo "Nothing to commit" - git push origin "$SOURCE_BRANCH" \ No newline at end of file + # - name: Commit and push updated manifest + # if: success() + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # run: | + # git config user.name "github-actions[bot]" + # git config user.email "github-actions[bot]@users.noreply.github.com" + # SOURCE_BRANCH="${{ github.event.release.target_commitish }}" + # if [ -z "$SOURCE_BRANCH" ]; then + # echo "Could not determine source branch. Exiting." + # exit 1 + # fi + # if [[ "$SOURCE_BRANCH" =~ ^[0-9a-f]{40}$ ]]; then + # echo "Commitish is a SHA, not a branch name. Aborting." + # exit 1 + # fi + # git fetch origin "$SOURCE_BRANCH" + # git switch "$SOURCE_BRANCH" + # git pull origin "$SOURCE_BRANCH" + # git add ./PSQuickGraph/*.psd1 + # git commit -m "ci: update module version to ${{ steps.set_version.outputs.version }}" || echo "Nothing to commit" + # git push origin "$SOURCE_BRANCH" \ No newline at end of file