Skip to content

Commit 84d7bac

Browse files
⚙️ [Maintenance]: Add path filter and align Release workflow (#283)
Aligning the workflow structure to match the convention used across all action repos in the PSModule organization. This includes renaming to `Release` and adding a `paths` filter with negation patterns, so only changes to the 16 reusable workflow files trigger a release. - Fixes #282 ## Renamed to `Release.yml` The workflow file is renamed from `Auto-Release.yml` to `Release.yml` to align with the naming convention used across all action repos (`Build-PSModule`, `GitHub-Script`, `Publish-PSModule`, etc.). The workflow name, run-name, job name, step names, and permission comments are all aligned. ## Path filter with negation patterns The `Release.yml` now uses `paths` with `!` negation entries to include all workflow files while explicitly excluding the 4 internal-only workflows: ```yaml paths: - '.github/workflows/**' - '!.github/workflows/Release.yml' - '!.github/workflows/Linter.yml' - '!.github/workflows/Workflow-Test-*' ``` What actions now triggers a release: | Change | Triggers release? | |--------|:-----------------:| | Reusable workflow file (e.g., `Build-Module.yml`) | Yes | | Internal workflow (e.g., `Linter.yml`, `Release.yml`) | No | | Linter config (`.github/linters/**`) | No | | Documentation (`README.md`) | No | | Tests (`tests/**`) | No | ## Removed `IncrementalPrerelease: false` This was a non-default override. Dropping it aligns with the action repos, which use the default from `Release-GHRepository`. --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: MariusStorhaug <17722253+MariusStorhaug@users.noreply.github.com> Co-authored-by: Marius Storhaug <marstor@hotmail.com>
1 parent 2d403df commit 84d7bac

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed
Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
name: Auto-Release
1+
name: Release
22

3-
run-name: "Auto-Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
3+
run-name: "Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
44

55
on:
66
pull_request:
@@ -12,25 +12,28 @@ on:
1212
- reopened
1313
- synchronize
1414
- labeled
15+
paths:
16+
- '.github/workflows/**'
17+
- '!.github/workflows/Release.yml'
18+
- '!.github/workflows/Linter.yml'
19+
- '!.github/workflows/Workflow-Test-*'
1520

1621
concurrency:
1722
group: ${{ github.workflow }}-${{ github.ref }}
1823
cancel-in-progress: true
1924

2025
permissions:
21-
contents: write
22-
pull-requests: write
26+
contents: write # Required to create releases
27+
pull-requests: write # Required to create comments on the PRs
2328

2429
jobs:
25-
Auto-Release:
30+
Release:
2631
runs-on: ubuntu-latest
2732
steps:
28-
- name: Checkout Code
33+
- name: Checkout repo
2934
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3035
with:
3136
persist-credentials: false
3237

33-
- name: Auto-Release
38+
- name: Release
3439
uses: PSModule/Release-GHRepository@5a5165d66f485d1aad217ef34a190178b214fdcb # v2.0.2
35-
with:
36-
IncrementalPrerelease: false

0 commit comments

Comments
 (0)