Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 33 additions & 24 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down Expand Up @@ -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"
# - 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"
2 changes: 1 addition & 1 deletion PSQuickGraph/PSQuickGraph.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -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 = @()

Expand Down
Loading