generated from KinsonDigital/CSharpLibTemplateRepo
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Start work for issue #111 * ci: rename workflows * ci: improve workflows * ide: simple ide improvements * docs: move images folder * docs: move release notes * ide: update tab settings * ci: update workflow command syntax & update reusable workflow versions
- Loading branch information
1 parent
a22a203
commit a48c862
Showing
34 changed files
with
258 additions
and
151 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
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,81 @@ | ||
name: 🚁Prepare Release | ||
|
||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release-type: | ||
description: The type of release. Choose 'Preview' or 'Production'. | ||
required: true | ||
type: choice | ||
options: [Preview, Production] | ||
release-version: | ||
required: true | ||
description: The version of the release to prepare. | ||
type: string | ||
|
||
|
||
jobs: | ||
print_validate_workflow: | ||
name: Ptin & Validate Prepare Release Workflow | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Print Environment Variables | ||
run: Get-ChildItem -Path Env:* | Sort-Object Name | ||
|
||
- name: Validate Workflow Inputs | ||
run: | | ||
$releaseType = "${{ inputs.release-type }}".ToLower(); | ||
if (""${{ vars.PROJECT_NAME }}".Trim().ToLower() -eq "") { | ||
Write-Host "::error::The 'PROJECT_NAME' org or repo variable be empty."; | ||
exit 1; | ||
} | ||
if ($releaseType -eq "") { | ||
Write-Host "::error::The 'release-type' workflow input cannot be empty."; | ||
exit 1; | ||
} | ||
if ($releaseType -ne 'preview' -and $releaseType -ne 'roduction') { | ||
Write-Host "::error::The release type input must be either 'Preview' or 'Production'."; | ||
exit 1; | ||
} | ||
$releaseVersion = "${{ inputs.release-version }}".Trim().ToLower(); | ||
if ($releaseVersion -eq "") { | ||
Write-Host "::error::The release version input cannot be empty."; | ||
exit 1; | ||
} | ||
$prodVersionRegex = "v[0-9]+\.[0-9]+\.[0-9]+"; | ||
$prevVersionRegex = "v[0-9]+\.[0-9]+\.[0-9]+-preview\.[0-9]+"; | ||
# Verify that the version has valid syntax | ||
if (($releaseVersion -match $prodVersionRegex) -or ($releaseVersion -match $prevVersionRegex)) { | ||
Write-Host "::notice::The 'release-version' workflow input is valid."; | ||
} else { | ||
$versionSyntax = $releaseType == "production" ? "v#.#.#" : "v#.#.#-preview.#"; | ||
Write-Host "::error::The 'release-version' workflow input is not valid. Expected format: '$versionSyntax"; | ||
exit 1; | ||
} | ||
prepare_release: | ||
name: Prepare ${{ inputs.release-type }} Release Of ${{ vars.PROJECT_NAME }} | ||
uses: KinsonDigital/Infrastructure/.github/workflows/prepare-release.yml@v10.0.1 | ||
with: | ||
project-name: ${{ vars.PROJECT_NAME }} | ||
release-type: ${{ inputs.release-type }} | ||
release-version: ${{ inputs.release-version }} | ||
secrets: | ||
cicd-pat: ${{ secrets.CICD_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: 🚀Release | ||
run-name: ${{ vars.PROJECT_NAME }} ${{ inputs.release-type }} Release ${{ inputs.dry-run == true && '(Dry Run)' || '' }} | ||
|
||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release-type: | ||
description: The type of release. Choose 'Preview' or 'Production'. | ||
required: true | ||
type: choice | ||
options: [Preview, Production] | ||
dry-run: | ||
description: Check to run the workflow without creating a release. | ||
required: false | ||
default: false | ||
type: boolean | ||
|
||
|
||
jobs: | ||
run_release: | ||
name: Performing ${{ inputs.release-type }} Release of ${{ vars.PROJECT_NAME }} (${{ inputs.release-type == 'Production' && 'Release' || 'Debug' }}) | ||
uses: KinsonDigital/Infrastructure/.github/workflows/dotnet-lib-release.yml@v10.0.1 | ||
with: | ||
project-name: "${{ vars.PROJECT_NAME}}" | ||
release-type: "${{ inputs.release-type }}" | ||
run-branch: "${{ github.ref_name }}" | ||
net-sdk-version: "${{ vars.NET_SDK_VERSION }}" | ||
relative-release-notes-dir-path: "${{ vars.RELATIVE_RELEASE_NOTES_DIR_PATH }}" | ||
release-notes-file-name-prefix: "${{ vars.RELEASE_NOTES_FILE_NAME_PREFIX }}" | ||
build-config: ${{ inputs.release-type == 'Production' && 'Release' || 'Debug' }} | ||
pr-include-notes-label: "${{ vars.PR_INCLUDE_NOTES_LABEL }}" | ||
send-release-tweet: ${{ vars.TWITTER_BROADCAST_ENABLED == 'true' }} | ||
dry-run: ${{ inputs.dry-run }} | ||
transpile-readme: true | ||
secrets: | ||
cicd-pat: "${{ secrets.CICD_TOKEN }}" | ||
nuget-org-api-key: "${{ secrets.NUGET_ORG_API_KEY }}" | ||
twitter-consumer-api-key: "${{ secrets.TWITTER_CONSUMER_API_KEY }}" | ||
twitter-consumer-api-secret: "${{ secrets.TWITTER_CONSUMER_API_SECRET }}" | ||
twitter-access-token: "${{ secrets.TWITTER_ACCESS_TOKEN }}" | ||
twitter-access-token-secret: "${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}" |
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
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.