-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from ShaunLawrie/prerelease
Prerelease
- Loading branch information
Showing
91 changed files
with
2,340 additions
and
2,089 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,10 @@ name: Publish to PSGallery | |
env: | ||
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }} | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
- prerelease | ||
|
||
permissions: | ||
contents: write | ||
|
@@ -14,17 +14,19 @@ jobs: | |
publish-to-psgallery: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Version Bump | ||
shell: pwsh | ||
run: | | ||
$ErrorActionPreference = "Stop" | ||
& .\PwshSpectreConsole\Build.ps1 | ||
$env:PSModulePath = @($env:PSModulePath, ".\PwshSpectreConsole\") -join ":" | ||
$version = Get-Module PwshSpectreConsole -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version | ||
if($null -eq $version) { throw "Failed to load version" } | ||
$newVersion = [version]::new($version.Major, $version.Minor, $version.Build + 1) | ||
$newVersion = [version]::new($version.Major, $version.Minor + 1, 0) | ||
Write-Host "Bumping version from $version to $newVersion" | ||
Update-ModuleManifest -Path .\PwshSpectreConsole\PwshSpectreConsole.psd1 -ModuleVersion $newVersion | ||
git config --global user.name 'Shaun Lawrie (via GitHub Actions)' | ||
|
@@ -33,8 +35,38 @@ jobs: | |
git commit -m "[skip ci] Bump version to $newVersion" | ||
git push | ||
- name: Deploy Package | ||
shell: pwsh | ||
run: | | ||
$ErrorActionPreference = "Stop" | ||
Publish-Module -Path "./PwshSpectreConsole/" -Exclude "Build.ps1" -NugetApiKey $env:PSGALLERY_API_KEY | ||
publish-prerelease-to-psgallery: | ||
name: Publish Prerelease | ||
runs-on: ubuntu-latest | ||
if: github.ref == 'refs/heads/prerelease' | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v3 | ||
- name: Version Bump and Publish | ||
shell: pwsh | ||
run: | | ||
$ErrorActionPreference = "Stop" | ||
& ./PwshSpectreConsole/Build.ps1 | ||
Publish-Module -Path "./PwshSpectreConsole/" -NugetApiKey $env:PSGALLERY_API_KEY | ||
$env:PSModulePath = @($env:PSModulePath, ".\PwshSpectreConsole\") -join ":" | ||
$version = Get-Module PwshSpectreConsole -ListAvailable | Sort-Object -Property Version -Descending | Select-Object -First 1 -ExpandProperty Version | ||
if($null -eq $version) { throw "Failed to load version" } | ||
$newVersion = [version]::new($version.Major, $version.Minor, $version.Build + 1) | ||
Write-Host "Bumping version from $version to $newVersion" | ||
Update-ModuleManifest -Path .\PwshSpectreConsole\PwshSpectreConsole.psd1 -ModuleVersion $newVersion | ||
git config --global user.name 'Shaun Lawrie (via GitHub Actions)' | ||
git config --global user.email '[email protected]' | ||
git add PwshSpectreConsole/PwshSpectreConsole.psd1 | ||
git commit -m "[skip ci] Bump version to $newVersion" | ||
git push | ||
# Mark as prerelease | ||
Update-ModuleManifest -Path .\PwshSpectreConsole\PwshSpectreConsole.psd1 -PrivateData @{ Prerelease = 'prerelease' } | ||
# Publish pre-release version | ||
Import-Module .\PwshSpectreConsole\PwshSpectreConsole.psd1 -Force | ||
Publish-Module -Name PwshSpectreConsole -Exclude "Build.ps1" -NugetApiKey $env:PSGALLERY_API_KEY -AllowPrerelease |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
name: Publish Doc Site | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
{ | ||
} | ||
"powershell.codeFormatting.preset": "OTBS", | ||
"editor.formatOnPaste": false, | ||
"editor.formatOnSave": false, | ||
"editor.formatOnType": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.