Skip to content
Open
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
56 changes: 7 additions & 49 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,13 @@
name: CI
on:
pull_request:
workflow_dispatch:
permissions:
checks: write
pull-requests: write
contents: read
on:
push:
branches: [master]
paths:
- 'Plaster/**'
- 'Tests/**'
- 'build.ps1'
- 'psakeFile.ps1'
- 'requirements.psd1'
pull_request:
paths:
- 'Plaster/**'
- 'Tests/**'
- 'build.ps1'
- 'psakeFile.ps1'
- 'requirements.psd1'
workflow_dispatch:

issues: write
jobs:
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4
- name: Test
shell: pwsh
run: ./build.ps1 -Task Test -Bootstrap
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: testResults-${{ matrix.os }}
path: ./tests/out/testResults.xml

publish-test-results:
name: Publish Test Results
needs: test
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
- uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: artifacts/**/*.xml
ci:
name: Continuous Integration
uses: PowerShellOrg/.github/.github/workflows/powershell-ci.yml@main
40 changes: 27 additions & 13 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
name: Publish Module
permissions:
contents: read
on:
# Manual-dispatch only, so releases are deliberate.
push:
branches:
- main
workflow_dispatch:

inputs:
version:
description: "The version to publish. Leave empty to use the version in the module manifest."
required: false
type: string
isPrerelease:
description: "Is this a prerelease version?"
required: false
type: boolean
default: false
dry_run:
description: "If true, skip actual publishing and just validate the workflow logic."
required: false
type: boolean
default: false
permissions:
contents: write
jobs:
publish:
name: Publish to PSGallery
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build and Publish
shell: pwsh
env:
PSGALLERY_API_KEY: ${{ secrets.GALLERY_KEY }}
run: ./build.ps1 -Task Publish -Bootstrap
name: Publish Module
uses: PowerShellOrg/.github/.github/workflows/powershell-release.yml@main
with:
version: ${{ inputs.version || '' }}
isPrerelease: ${{ inputs.isPrerelease || false }}
dry_run: ${{ inputs.dry_run || false }}
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Release
on:
push:
tags: ['v*']
workflow_dispatch:

jobs:
release:
uses: PowerShellOrg/.github/.github/workflows/powershell-release.yml@main
with:
module-name: Plaster
secrets:
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }}

Check warning on line 13 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / Continuous Integration / Run Linters

Unknown word (PSGALLERY) Suggestions: (psaltery, spaller, psaltry, psalter, psalters)

Check warning on line 13 in .github/workflows/release.yml

View workflow job for this annotation

GitHub Actions / Continuous Integration / Run Linters

Unknown word (PSGALLERY) Suggestions: (psaltery, spaller, psaltry, psalter, psalters)
Loading