Skip to content

Commit 5a8737a

Browse files
committed
Merge branch 'release/1.3.0'
2 parents 62d6346 + 5f9d8a5 commit 5a8737a

9 files changed

Lines changed: 99 additions & 32 deletions

File tree

.github/workflows/build-pages.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
on:
2+
# Runs on pushes targeting the default branch
3+
push:
4+
branches: ["main"]
5+
6+
# Allows you to run this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow one concurrent deployment
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: true
19+
20+
jobs:
21+
# Build job
22+
build:
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v3
27+
- name: Setup Pages
28+
uses: actions/configure-pages@v3
29+
- name: Build with Jekyll
30+
uses: actions/jekyll-build-pages@v1
31+
with:
32+
source: ./
33+
destination: ./_site
34+
- name: Upload artifact
35+
uses: actions/upload-pages-artifact@v1
36+
37+
# Deployment job
38+
deploy:
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
runs-on: ubuntu-latest
43+
needs: build
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v1

.github/workflows/build-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ on:
66

77
jobs:
88
build-validation:
9-
uses: abbgrade/PsBuildTasks/.github/workflows/build-validation-matrix.yml@1.4.0
9+
uses: abbgrade/PsBuildTasks/.github/workflows/build-validation-matrix.yml@1.11.0

.github/workflows/pre-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
on:
22
push:
3-
branches: [ release/*, hotfix/* ]
3+
branches: [ release/* ]
44
workflow_dispatch:
55

66
jobs:
77
pre-release:
8-
uses: abbgrade/PsBuildTasks/.github/workflows/pre-release-windows.yml@1.4.0
8+
uses: abbgrade/PsBuildTasks/.github/workflows/pre-release-windows.yml@1.11.0
99
with:
1010
module-name: PsSmo
1111
secrets:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
release:
8-
uses: abbgrade/PsBuildTasks/.github/workflows/release-windows.yml@1.4.0
8+
uses: abbgrade/PsBuildTasks/.github/workflows/release-windows.yml@1.11.0
99
with:
1010
module-name: PsSmo
1111
secrets:

.vscode/launch.json

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
{
2-
// Verwendet IntelliSense zum Ermitteln möglicher Attribute.
3-
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
4-
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
52
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"name": "PowerShell: Launch Current File",
9-
"type": "PowerShell",
10-
"request": "launch",
11-
"script": "${file}",
12-
"cwd": "${file}"
13-
}
14-
]
15-
}
3+
"configurations": []
4+
}

_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
theme: jekyll-theme-minimal

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Index
1+
# Commands
22

33
<ul>
44
{% for page in site.pages %}
5-
{% if page.title and page.title != 'Index' %}
5+
{% if page.title and page.title != 'Commands' and page.dir == '/docs/' %}
66
<li><a href="{{ page.url | relative_url }}">{{ page.title }}</a></li>
77
{% endif %}
88
{% endfor %}

tasks/Build.Tasks.ps1

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Copy from original https://github.com/abbgrade/PsBuildTasks/blob/main/DotNet/Build.Tasks.ps1
2+
13
requires Configuration
24
requires ModuleName
35

@@ -59,8 +61,11 @@ task Clean {
5961
task Install -Jobs Build, {
6062
$info = Import-PowerShellDataFile $Global:Manifest
6163
$version = ([System.Version] $info.ModuleVersion)
62-
$defaultModulePath = $env:PsModulePath -split ';' | Select-Object -First 1
63-
Write-Verbose "install $ModuleName $version to $defaultModulePath"
64+
$defaultModulePath = $env:PSModulePath -split ';' | Select-Object -First 1
65+
if ( -not $defaultModulePath ) {
66+
Write-Error "Failed to determine default module path from `$env:PSModulePath='$( $env:PSModulePath )'"
67+
}
68+
Write-Verbose "install $ModuleName $version to '$defaultModulePath'"
6469
$installPath = Join-Path $defaultModulePath $ModuleName $version.ToString()
6570
New-Item -Type Directory $installPath -Force | Out-Null
6671
Get-ChildItem $Global:Manifest.Directory | Copy-Item -Destination $installPath -Recurse -Force

tasks/PsBuild.Tasks.ps1

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
2+
if ( -Not $PsBuildTaskBranch ) {
3+
$PsBuildTaskBranch = 'main'
4+
}
5+
16
#region InvokeBuild
27

38
task UpdateBuildTasks {
49
Invoke-WebRequest `
5-
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/DotNet/Build.Tasks.ps1' `
10+
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/DotNet/Build.Tasks.ps1" `
611
-OutFile "$PSScriptRoot\Build.Tasks.ps1"
712
}
813

@@ -13,7 +18,15 @@ task UpdateValidationWorkflow {
1318
[System.IO.FileInfo] $file = "$PSScriptRoot/../.github/workflows/build-validation.yml"
1419
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
1520
Invoke-WebRequest `
16-
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/build-validation-matrix.yml' `
21+
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/GitHub/build-validation-matrix.yml" `
22+
-OutFile $file
23+
}
24+
25+
task UpdatePagesWorkflow {
26+
[System.IO.FileInfo] $file = "$PSScriptRoot/../.github/workflows/build-pages.yml"
27+
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
28+
Invoke-WebRequest `
29+
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/GitHub/build-pages.yml" `
1730
-OutFile $file
1831
}
1932

@@ -22,7 +35,7 @@ task UpdatePreReleaseWorkflow {
2235
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.github\workflows\pre-release.yml"
2336
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
2437
Invoke-WebRequest `
25-
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/pre-release-windows.yml' |
38+
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/GitHub/pre-release-windows.yml" |
2639
ForEach-Object { $_ -replace 'MyModuleName', $ModuleName } |
2740
Out-File $file -NoNewline
2841
}
@@ -32,22 +45,24 @@ task UpdateReleaseWorkflow {
3245
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.github\workflows\release.yml"
3346
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
3447
Invoke-WebRequest `
35-
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/release-windows.yml' |
48+
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/GitHub/release-windows.yml" |
3649
ForEach-Object { $_ -replace 'MyModuleName', $ModuleName } |
3750
Out-File $file -NoNewline
3851
}
3952

53+
task UpdateWorkflows -Jobs UpdateValidationWorkflow, UpdatePagesWorkflow, UpdatePreReleaseWorkflow, UpdateReleaseWorkflow
54+
4055
#endregion
4156
#region GitHub Pages
4257

4358
task UpdateIndexPage {
4459
New-Item -Type Directory "$PSScriptRoot\..\docs" -ErrorAction SilentlyContinue
4560
Invoke-WebRequest `
46-
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/docs/index.md' `
61+
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/docs/index.md" `
4762
-OutFile "$PSScriptRoot\..\docs\index.md"
4863
Invoke-WebRequest `
49-
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/docs/_config.yml' `
50-
-OutFile "$PSScriptRoot\..\docs\_config.yml"
64+
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/_config.yml" `
65+
-OutFile "$PSScriptRoot\..\_config.yml"
5166
}
5267

5368
#endregion
@@ -58,7 +73,7 @@ task UpdateDependabotConfig {
5873
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.github\dependabot.yml"
5974
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
6075
Invoke-WebRequest `
61-
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/dependabot/dependabot.yml' |
76+
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/dependabot/dependabot.yml" |
6277
ForEach-Object { $_ -replace 'MyModuleName', $ModuleName } |
6378
Out-File $file -NoNewline
6479
}
@@ -70,19 +85,29 @@ task UpdateVsCodeTasks {
7085
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.vscode\tasks.json"
7186
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
7287
Invoke-WebRequest `
73-
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/VsCode/tasks.json' `
88+
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/VsCode/tasks.json" `
7489
-OutFile $file
7590
}
7691

92+
task UpdateVsCodeLaunch {
93+
requires ModuleName
94+
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.vscode\launch.json"
95+
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue
96+
Invoke-WebRequest `
97+
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/VsCode/launch.json" |
98+
ForEach-Object { $_ -replace 'MyModuleName', $ModuleName } |
99+
Out-File $file -NoNewline
100+
}
101+
77102
#endregion
78103
#region PsBuildTasks
79104

80105
task UpdatePsBuildTasksTasks {
81106
Invoke-WebRequest `
82-
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/tasks/Dotnet-Matrix.Tasks.ps1' `
107+
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/tasks/Dotnet-Matrix.Tasks.ps1" `
83108
-OutFile "$PSScriptRoot\PsBuild.Tasks.ps1"
84109
}
85110

86111
#endregion
87112

88-
task UpdatePsBuildTasks -Jobs UpdateBuildTasks, UpdateValidationWorkflow, UpdatePreReleaseWorkflow, UpdateReleaseWorkflow, UpdateIndexPage, UpdateDependabotConfig, UpdateVsCodeTasks, UpdatePsBuildTasksTasks
113+
task UpdatePsBuildTasks -Jobs UpdateBuildTasks, UpdateWorkflows, UpdateIndexPage, UpdateDependabotConfig, UpdateVsCodeTasks, UpdateVsCodeLaunch, UpdatePsBuildTasksTasks

0 commit comments

Comments
 (0)