Skip to content

Commit a9325c3

Browse files
Add .gitattributes for line endings and binary file handling; update workflows for consistency
1 parent 724d0b8 commit a9325c3

File tree

6 files changed

+193
-177
lines changed

6 files changed

+193
-177
lines changed

.gitattributes

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Needed for publishing of examples, build worker defaults to core.autocrlf=input.
2+
* text eol=autocrlf
3+
4+
*.mof text eol=crlf
5+
*.sh text eol=lf
6+
*.svg eol=lf
7+
8+
# Ensure any exe files are treated as binary
9+
*.exe binary
10+
*.jpg binary
11+
*.xl* binary
12+
*.pfx binary
13+
*.png binary
14+
*.dll binary
15+
*.so binary

.github/workflows/Auto-Release.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,34 @@
1-
name: Auto-Release
2-
3-
run-name: "Auto-Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4-
5-
on:
6-
pull_request_target:
7-
branches:
8-
- main
9-
types:
10-
- closed
11-
- opened
12-
- reopened
13-
- synchronize
14-
- labeled
15-
16-
concurrency:
17-
group: ${{ github.workflow }}-${{ github.ref }}
18-
cancel-in-progress: true
19-
20-
permissions:
21-
contents: write # Required to create releases
22-
pull-requests: write # Required to create comments on the PRs
23-
24-
jobs:
25-
Auto-Release:
26-
runs-on: ubuntu-latest
27-
steps:
28-
- name: Checkout Code
29-
uses: actions/checkout@v4
30-
31-
- name: Auto-Release
32-
uses: PSModule/Auto-Release@v1
33-
env:
34-
GITHUB_TOKEN: ${{ github.token }}
1+
name: Auto-Release
2+
3+
run-name: "Auto-Release - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4+
5+
on:
6+
pull_request_target:
7+
branches:
8+
- main
9+
types:
10+
- closed
11+
- opened
12+
- reopened
13+
- synchronize
14+
- labeled
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
permissions:
21+
contents: write # Required to create releases
22+
pull-requests: write # Required to create comments on the PRs
23+
24+
jobs:
25+
Auto-Release:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout Code
29+
uses: actions/checkout@v4
30+
31+
- name: Auto-Release
32+
uses: PSModule/Auto-Release@v1
33+
env:
34+
GITHUB_TOKEN: ${{ github.token }}

.github/workflows/Linter.yml

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
name: Linter
2-
3-
run-name: "Linter - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4-
5-
on: [pull_request]
6-
7-
concurrency:
8-
group: ${{ github.workflow }}-${{ github.ref }}
9-
cancel-in-progress: true
10-
11-
permissions:
12-
contents: read
13-
packages: read
14-
statuses: write
15-
16-
jobs:
17-
Lint:
18-
name: Lint code base
19-
runs-on: ubuntu-latest
20-
steps:
21-
- name: Checkout repo
22-
uses: actions/checkout@v4
23-
with:
24-
fetch-depth: 0
25-
26-
- name: Lint code base
27-
uses: super-linter/super-linter/slim@latest
28-
env:
29-
GITHUB_TOKEN: ${{ github.token }}
30-
VALIDATE_MARKDOWN_PRETTIER: false
31-
VALIDATE_JSON_PRETTIER: false
32-
VALIDATE_YAML_PRETTIER: false
1+
name: Linter
2+
3+
run-name: "Linter - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"
4+
5+
on: [pull_request]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
permissions:
12+
contents: read
13+
packages: read
14+
statuses: write
15+
16+
jobs:
17+
Lint:
18+
name: Lint code base
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout repo
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Lint code base
27+
uses: super-linter/super-linter/slim@latest
28+
env:
29+
GITHUB_TOKEN: ${{ github.token }}
30+
VALIDATE_MARKDOWN_PRETTIER: false
31+
VALIDATE_JSON_PRETTIER: false
32+
VALIDATE_YAML_PRETTIER: false
33+
VALIDATE_JSCPD: false

.gitignore

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
## Ignore Visual Studio Code temporary files, build results, and
2-
## files generated by popular Visual Studio Code add-ons.
3-
##
4-
## Get latest from https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore
5-
.vscode/*
6-
!.vscode/settings.json
7-
!.vscode/extensions.json
8-
*.code-workspace
9-
10-
# Local History for Visual Studio Code
11-
.history/
1+
## Ignore Visual Studio Code temporary files, build results, and
2+
## files generated by popular Visual Studio Code add-ons.
3+
##
4+
## Get latest from https://github.com/github/gitignore/blob/master/Global/VisualStudioCode.gitignore
5+
.vscode/*
6+
!.vscode/settings.json
7+
!.vscode/extensions.json
8+
*.code-workspace
9+
10+
# Local History for Visual Studio Code
11+
.history/

LICENSE

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
MIT License
2-
3-
Copyright (c) 2025 PSModule
4-
5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
11-
12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
14-
15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
1+
MIT License
2+
3+
Copyright (c) 2025 PSModule
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

action.yml

Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,79 @@
1-
name: Build-PSModuleDocumentation (by PSModule)
2-
description: Build documentation for a PowerShell module.
3-
author: PSModule
4-
branding:
5-
icon: package
6-
color: gray-dark
7-
8-
inputs:
9-
Name:
10-
description: Name of the module to process.
11-
required: false
12-
Path:
13-
description: Path to the folder where the modules are located.
14-
required: false
15-
default: src
16-
ModulesOutputPath:
17-
description: Path to the folder where the built modules are outputted.
18-
required: false
19-
default: outputs/modules
20-
DocsOutputPath:
21-
description: Path to the folder where the built docs are outputted.
22-
required: false
23-
default: outputs/docs
24-
ModuleArtifactName:
25-
description: Name of the module artifact to upload.
26-
required: false
27-
default: module
28-
DocsArtifactName:
29-
description: Name of the docs artifact to upload.
30-
required: false
31-
default: docs
32-
Debug:
33-
description: Enable debug output.
34-
required: false
35-
default: 'false'
36-
Verbose:
37-
description: Enable verbose output.
38-
required: false
39-
default: 'false'
40-
Version:
41-
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
42-
required: false
43-
Prerelease:
44-
description: Allow prerelease versions if available.
45-
required: false
46-
default: 'false'
47-
48-
runs:
49-
using: composite
50-
steps:
51-
- name: Download module artifact
52-
uses: actions/download-artifact@v4
53-
with:
54-
name: ${{ inputs.ModuleArtifactName }}
55-
path: ${{ inputs.ModulesOutputPath }}
56-
57-
- name: Run Build-PSModuleDocumentation
58-
uses: PSModule/GitHub-Script@v1
59-
env:
60-
GITHUB_ACTION_INPUT_Name: ${{ inputs.Name }}
61-
GITHUB_ACTION_INPUT_Path: ${{ inputs.Path }}
62-
GITHUB_ACTION_INPUT_ModulesOutputPath: ${{ inputs.ModulesOutputPath }}
63-
GITHUB_ACTION_INPUT_DocsOutputPath: ${{ inputs.DocsOutputPath }}
64-
with:
65-
Debug: ${{ inputs.Debug }}
66-
Prerelease: ${{ inputs.Prerelease }}
67-
Verbose: ${{ inputs.Verbose }}
68-
Version: ${{ inputs.Version }}
69-
Script: |
70-
# Build-PSModuleDocumentation
71-
${{ github.action_path }}\scripts\main.ps1
72-
73-
- name: Upload docs artifact
74-
uses: actions/upload-artifact@v4
75-
with:
76-
name: ${{ inputs.DocsArtifactName }}
77-
path: ${{ inputs.DocsOutputPath }}
78-
if-no-files-found: error
79-
retention-days: 1
1+
name: Build-PSModuleDocumentation (by PSModule)
2+
description: Build documentation for a PowerShell module.
3+
author: PSModule
4+
branding:
5+
icon: package
6+
color: gray-dark
7+
8+
inputs:
9+
Name:
10+
description: Name of the module to process.
11+
required: false
12+
Path:
13+
description: Path to the folder where the modules are located.
14+
required: false
15+
default: src
16+
ModulesOutputPath:
17+
description: Path to the folder where the built modules are outputted.
18+
required: false
19+
default: outputs/modules
20+
DocsOutputPath:
21+
description: Path to the folder where the built docs are outputted.
22+
required: false
23+
default: outputs/docs
24+
ModuleArtifactName:
25+
description: Name of the module artifact to upload.
26+
required: false
27+
default: module
28+
DocsArtifactName:
29+
description: Name of the docs artifact to upload.
30+
required: false
31+
default: docs
32+
Debug:
33+
description: Enable debug output.
34+
required: false
35+
default: 'false'
36+
Verbose:
37+
description: Enable verbose output.
38+
required: false
39+
default: 'false'
40+
Version:
41+
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
42+
required: false
43+
Prerelease:
44+
description: Allow prerelease versions if available.
45+
required: false
46+
default: 'false'
47+
48+
runs:
49+
using: composite
50+
steps:
51+
- name: Download module artifact
52+
uses: actions/download-artifact@v4
53+
with:
54+
name: ${{ inputs.ModuleArtifactName }}
55+
path: ${{ inputs.ModulesOutputPath }}
56+
57+
- name: Run Build-PSModuleDocumentation
58+
uses: PSModule/GitHub-Script@v1
59+
env:
60+
GITHUB_ACTION_INPUT_Name: ${{ inputs.Name }}
61+
GITHUB_ACTION_INPUT_Path: ${{ inputs.Path }}
62+
GITHUB_ACTION_INPUT_ModulesOutputPath: ${{ inputs.ModulesOutputPath }}
63+
GITHUB_ACTION_INPUT_DocsOutputPath: ${{ inputs.DocsOutputPath }}
64+
with:
65+
Debug: ${{ inputs.Debug }}
66+
Prerelease: ${{ inputs.Prerelease }}
67+
Verbose: ${{ inputs.Verbose }}
68+
Version: ${{ inputs.Version }}
69+
Script: |
70+
# Build-PSModuleDocumentation
71+
${{ github.action_path }}\scripts\main.ps1
72+
73+
- name: Upload docs artifact
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: ${{ inputs.DocsArtifactName }}
77+
path: ${{ inputs.DocsOutputPath }}
78+
if-no-files-found: error
79+
retention-days: 1

0 commit comments

Comments
 (0)