Skip to content

Merge pull request #128 from arpan3t/tablerowseparator #393

Merge pull request #128 from arpan3t/tablerowseparator

Merge pull request #128 from arpan3t/tablerowseparator #393

name: Publish to PSGallery
on:
push:
branches:
- main
- prerelease
pull_request:
types: [opened, synchronize, reopened]
branches:
- prerelease
permissions:
contents: write
jobs:
publish-to-psgallery:
name: Publish
environment: prod
env:
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.repository_owner == 'ShaunLawrie'
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.PIPELINE_PAT }}
- name: Version Bump and Publish
uses: ./.github/actions/version-bump-and-publish
with:
psgallery-api-key: ${{ secrets.PSGALLERY_API_KEY }}
github-token: ${{ secrets.PIPELINE_PAT }}
publish-type: stable
- name: Upload Snapshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: Snapshots
path: PwshSpectreConsole.Tests/@snapshots/*.txt
publish-prerelease-to-psgallery:
name: Publish Prerelease
environment: prod
env:
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/prerelease' && github.repository_owner == 'ShaunLawrie'
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.PIPELINE_PAT }}
- name: Version Bump and Publish
id: version-bump-and-publish
uses: ./.github/actions/version-bump-and-publish
with:
psgallery-api-key: ${{ secrets.PSGALLERY_API_KEY }}
github-token: ${{ secrets.PIPELINE_PAT }}
publish-type: prerelease
- name: Deploy
uses: cloudflare/wrangler-action@v3
if: steps.version-bump-and-publish.outputs.docs-require-deployment == 'true'
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
workingDirectory: "./PwshSpectreConsole.Docs/dist"
command: pages deploy . --project-name pwshspectreconsole --commit-dirty=true --branch=prerelease
- name: Upload Snapshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: Snapshots
path: PwshSpectreConsole.Tests/@snapshots/*.txt