-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Various changes, support for Shlink 3, see CHANGELOG.md +semver: minor
- Loading branch information
Showing
33 changed files
with
335 additions
and
256 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 |
---|---|---|
|
@@ -3,8 +3,7 @@ name: "Create GitHub release and publish to the PowerShell Gallery" | |
on: | ||
push: | ||
paths: | ||
- 'PSShlink/**' | ||
- '!PSShlink/tests/**' | ||
- 'src/**' | ||
branches: | ||
- main | ||
- master | ||
|
@@ -36,15 +35,28 @@ jobs: | |
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted | ||
Install-Module "InvokeBuild" -Force | ||
$Username, $ProjectName = $env:GITHUB_REPOSITORY -split "/" | ||
Invoke-Build -ModuleName $ProjectName -Author $Username -Task "InstallDependencies","ImportBuildModule","SetGitHubActionEnvironmentVariables" | ||
Invoke-Build -File "invoke.build.ps1" -ModuleName $ProjectName -Author $Username -Task "InstallDependencies","ImportBuildModule","SetGitHubActionEnvironmentVariables" | ||
shell: pwsh | ||
|
||
- name: Build | ||
run: Invoke-Build -ModuleName $env:GH_PROJECTNAME -Author $env:GH_USERNAME -Version $env:GitVersion_SemVer -NewRelease $true | ||
run: | | ||
$Params = @{ | ||
ModuleName = $env:GH_PROJECTNAME | ||
Author = $env:GH_USERNAME | ||
Version = $env:GitVersion_SemVer | ||
NewRelease = $true | ||
} | ||
Invoke-Build -File "custom.build.ps1" @Params -Task PreBuild | ||
Invoke-Build -File "invoke.build.ps1" @Params | ||
Invoke-Build -File "custom.build.ps1" @Params -Task PostBuild | ||
shell: pwsh | ||
|
||
- name: Custom pre-release tasks | ||
run: Invoke-Build -File "custom.build.ps1" -ModuleName $env:GH_PROJECTNAME -Author $env:GH_USERNAME -Version $env:GitVersion_SemVer -NewRelease $true -Task PreRelease | ||
shell: pwsh | ||
|
||
- name: Publish to PowerShell Gallery | ||
run: Invoke-Build -ModuleName $env:GH_PROJECTNAME -Task "PublishModule" | ||
run: Invoke-Build -File "invoke.build.ps1" -ModuleName $env:GH_PROJECTNAME -Task "PublishModule" | ||
shell: pwsh | ||
env: | ||
PSGALLERY_API_KEY: ${{ secrets.PSGALLERY_API_KEY }} | ||
|
@@ -76,10 +88,14 @@ jobs: | |
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
git add CHANGELOG.md ${GH_PROJECTNAME}/${GH_PROJECTNAME}.psd1 docs | ||
git add CHANGELOG.md src/${GH_PROJECTNAME}.psd1 docs | ||
git commit -m "Released ${{ env.GitVersion_SemVer }}" | ||
- name: Push commit | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Custom post-release tasks | ||
run: Invoke-Build -File "custom.build.ps1" -ModuleName $env:GH_PROJECTNAME -Author $env:GH_USERNAME -Version $env:GitVersion_SemVer -NewRelease $true -Task PostRelease | ||
shell: pwsh |
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,3 +1,5 @@ | ||
# This file does not start with a period in the codaamok.build FileList because there seems to be an issue with using files in a module manifest's FileList starting with a period | ||
build/* | ||
release/* | ||
!*.gitkeep | ||
release/* | ||
.DS_Store |
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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<# | ||
.SYNOPSIS | ||
Build script which leverages the InvokeBuild module. | ||
.DESCRIPTION | ||
Build script which leverages the InvokeBuild module. | ||
This build script is used in the build pipeline and local development for building this project. | ||
Invoked by invoke.build.ps1 in this project where its intent is to implement project-specific custom pre/post build actions during the build pipeline andds local development. | ||
#> | ||
[CmdletBinding()] | ||
param ( | ||
[Parameter()] | ||
[ValidateNotNullOrEmpty()] | ||
[String]$ModuleName, | ||
|
||
[Parameter()] | ||
[ValidateNotNullOrEmpty()] | ||
[String]$Author, | ||
|
||
[Parameter()] | ||
[String]$Version, | ||
|
||
[Parameter()] | ||
[Bool]$NewRelease | ||
) | ||
|
||
task PreBuild { | ||
|
||
} | ||
|
||
task PostBuild { | ||
|
||
} | ||
|
||
task PreRelease { | ||
|
||
} | ||
|
||
task PostRelease { | ||
|
||
} |
Oops, something went wrong.