diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9c39450..2e5948a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -89,12 +89,21 @@ 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 }} @@ -129,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 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 = @()