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
1 change: 1 addition & 0 deletions .github/workflows/Auto-Assign.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions: # added using https://github.com/step-security/secure-repo
jobs:
run:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
issues: write
pull-requests: write
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/Build External Help.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: πŸ“š Create External Help
on:
# Run after the 'Build Module' workflow completes.
workflow_run:
workflows: ["Build Module", "πŸ‘· Build Module"]
workflows: ["πŸ‘· Build Module"]
types:
- completed

Expand All @@ -25,6 +25,7 @@ jobs:
if: ${{ github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success' }}
# The New-ExternalHelpCab cmdlet uses makecab, which depends on Windows.
runs-on: windows-latest
timeout-minutes: 15
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/Build Module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
test:
name: πŸ§ͺ Run Tests and Build
runs-on: ubuntu-latest
timeout-minutes: 15
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/Deploy Zensical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
pages: write

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit

- name: βœ… Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

Expand Down Expand Up @@ -66,6 +71,11 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit

- name: βœ… Ensure deployment run is current branch head
id: current-head-check
uses: actions/github-script@d746ffe35508b1917358783b479e04febd2b8f71 # v9.0.0
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/Format Markdown.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Formats markdown files in docs/ using Prettier on push or manual trigger
# Formats markdown files in docs/ using Prettier. Manual trigger only (workflow_dispatch).
name: πŸ–ΌοΈ Format Markdown

on:
Expand All @@ -10,6 +10,7 @@ permissions:
jobs:
format:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
Expand Down
58 changes: 49 additions & 9 deletions .github/workflows/Publish Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@ name: 🏷️ Publish from Changelog Tag
# matches this tag and publish a new GitHub release with it, then publish the module to the PowerShell Gallery.
on:
push:
# `paths` filters aren't reliably applied to tag pushes, so this trigger is scoped to
# version tags only; the job's `if` guard below double-checks the ref is a tag.
tags:
- 'v*.*.*'
branches:
- main
paths:
- 'CHANGELOG.md'

# Allows manual triggering of the workflow.
workflow_dispatch:
Expand All @@ -20,14 +18,17 @@ concurrency:
cancel-in-progress: true

permissions:
contents: write
contents: read

jobs:
release:
name: πŸš€ Release and Publish
# Only run if the commit contains a tag
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: write
steps:

- name: Harden the runner (Audit all outbound calls)
Expand All @@ -38,14 +39,53 @@ jobs:
- name: βœ… Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

- name: πŸ“ Extract Changelog Section
id: changelog
shell: bash
run: |
set -euo pipefail
version="${GITHUB_REF_NAME#v}"
awk -v ver="$version" '
$0 ~ "^## \\[" ver "\\]" { found=1; print; next }
found && /^## \[/ { exit }
found { print }
' CHANGELOG.md > RELEASE_NOTES.md
if [ ! -s RELEASE_NOTES.md ]; then
echo "::error::No CHANGELOG.md section found matching version $version"
exit 1
fi

- name: πŸ₯Ύ Bootstrap
shell: pwsh
run: .\src\actions_bootstrap.ps1

- name: πŸ‘·β€β™‚οΈ Build Module
# Run every task except Archive so the module is built and tested first.
shell: pwsh
run: Invoke-Build -Task Clean, ValidateRequirements, ImportModuleManifest, FormattingCheck, Analyze, Test, CreateHelpStart, Build, IntegrationTest -File .\src\PSPreworkout.build.ps1

- name: 🧹 Remove Test Reports from Artifacts
# ccReport/testOutput are test-run artifacts, not part of the shipped module;
# strip them before archiving so the release package only contains the module.
shell: pwsh
run: |
Remove-Item -Path '.\src\Artifacts\ccReport' -Recurse -Force -ErrorAction SilentlyContinue
Remove-Item -Path '.\src\Artifacts\testOutput' -Recurse -Force -ErrorAction SilentlyContinue

- name: πŸ“¦ Archive Module
# Produces the .\src\Archive\*.zip package that the release step attaches below.
shell: pwsh
run: Invoke-Build -Task Archive -File .\src\PSPreworkout.build.ps1

- name: πŸ“¦ Create GitHub Release
# Creates a new release from a changelog section that matches a commit tag (eg: v1.2.5)
uses: docker://antonyurchenko/git-release:latest@sha256:499561e8dc416d976f1b130584f3bdb9ba2129c9c871449b007a3c4dd7a5eb08
# Creates a new release using the changelog section matching the pushed tag (eg: v1.2.5)
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
args: |
artifacts\\${{ GitHub.repository }}.zip
body_path: RELEASE_NOTES.md
files: src/Archive/*.zip
Comment thread
SamErde marked this conversation as resolved.
Resolved
fail_on_unmatched_files: true

- name: πŸš€ Publish PowerShell Module
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/Update MkDocs Navigation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ permissions:
jobs:
update-navigation:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
concurrency:
Expand Down
16 changes: 2 additions & 14 deletions .github/workflows/Validate Module Manifest.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
name: πŸ” Validate Module Manifest

on:
# Intentionally manual-only for now; not wired to pull_request/push triggers.
workflow_dispatch:
#pull_request:
# branches:
# - main
# - prerelease
# paths:
# - "src/PSPreworkout/Public/**"
# - "src/PSPreworkout/PSPreworkout.psd1"
#push:
# branches:
# - main
# - prerelease
# paths:
# - "src/PSPreworkout/Public/**"
# - "src/PSPreworkout/PSPreworkout.psd1"

permissions:
contents: read
Expand All @@ -24,6 +11,7 @@ jobs:
validate-manifest:
name: πŸ§ͺ Validate and Update Manifest
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/Validate Zensical.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ jobs:
timeout-minutes: 15

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit

- name: βœ… Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: Codacy Security Scan
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
# Checkout the repository to the GitHub Actions runner
- name: Harden the runner (Audit all outbound calls)
Expand All @@ -45,7 +46,7 @@ jobs:

# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
- name: Run Codacy Analysis CLI
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b
uses: codacy/codacy-analysis-cli-action@d840f886c4bd4edc059706d09c6a1586111c540b # 1.1.0
with:
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
# You can also omit the token and run the tools that support default configurations
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ permissions:
jobs:
dependency-review:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
timeout-minutes: 15
# `publish_results: true` only works when run from the default branch. conditional can be removed if disabled.
if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request'
if: github.event.repository.default_branch == github.ref_name
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/summary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions:
jobs:
summary:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
issues: write
models: read
Expand Down
Loading