Skip to content

Commit 2bbf7b4

Browse files
feat: Add GitHub Actions workflow for release automation
- Created a new GitHub Actions workflow (`Release.yml`) to automate the release process on pull request events. - Added a main script (`main.ps1`) to handle module name resolution and test path setup. - Introduced configuration files for module and source code tests. - Implemented test scripts for module and source code, including validation for module imports and manifest checks. - Updated test configuration to enable detailed output and code coverage. - Removed obsolete `SourceCode.Configuration.ps1` file from tests.
1 parent 4fc5705 commit 2bbf7b4

File tree

9 files changed

+11
-6
lines changed

9 files changed

+11
-6
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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:
6-
pull_request_target:
6+
pull_request:
77
branches:
88
- main
99
types:
@@ -12,6 +12,9 @@ on:
1212
- reopened
1313
- synchronize
1414
- labeled
15+
paths:
16+
- 'action.yml'
17+
- 'src/**'
1518

1619
concurrency:
1720
group: ${{ github.workflow }}-${{ github.ref }}
@@ -22,13 +25,15 @@ permissions:
2225
pull-requests: write
2326

2427
jobs:
25-
Auto-Release:
28+
Release:
2629
runs-on: ubuntu-latest
2730
steps:
2831
- name: Checkout Code
2932
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33+
with:
34+
persist-credentials: false
3035

31-
- name: Auto-Release
36+
- name: Release
3237
uses: PSModule/Auto-Release@eabd533035e2cb9822160f26f2eda584bd012356 # v1.9.5
3338
with:
3439
IncrementalPrerelease: false

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ runs:
278278
PSMODULE_TEST_PSMODULE_INPUT_Settings: ${{ inputs.Settings }}
279279
run: |
280280
# Get test paths
281-
${{ github.action_path }}/scripts/main.ps1
281+
${{ github.action_path }}/src/main.ps1
282282
283283
- name: Invoke-Pester
284284
uses: PSModule/Invoke-Pester@882994cbe1ff07c3fc8afdac52404c940f99b331 # v4.2.2
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

scripts/tests/SourceCode/PSModule/PSModule.Container.ps1 renamed to src/tests/SourceCode/PSModule/PSModule.Container.ps1

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)