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 #14 * ci: create workflow to auto add issues and prs to the org project * ci: create build status check workflow * ci: create unit test status check workflow * ci: create workflows to enable syncing system * ci: create workflow to auto triage issues * ci: create a workflow to perform prev and prod releases * ide: add tab settings to vscode settings config * config: update main solution level editorconfig * ide: add words to rider dictionary * docs: fix spelling errors in code docs * ide: update solution items * force status checks * ci: remove defaults from workflows
- Loading branch information
1 parent
5050a91
commit eaa2356
Showing
13 changed files
with
334 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 🤖Add New Issue To Project | ||
|
||
|
||
on: | ||
issues: | ||
types: opened | ||
pull_request: | ||
types: opened | ||
branches: [main, preview] | ||
|
||
|
||
jobs: | ||
add_new_issue_to_project: | ||
name: Add New Issue | ||
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected] | ||
with: | ||
org-name: "${{ vars.ORGANIZATION_NAME }}" | ||
org-project-name: "${{ vars.ORG_PROJECT_NAME }}" | ||
project-name: "${{ vars.PROJECT_NAME }}" | ||
secrets: | ||
cicd-pat: ${{ secrets.CICD_TOKEN }} |
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,17 @@ | ||
name: ✅Build Status Check | ||
run-name: ✅Build Status Check (${{ github.base_ref }} branch) | ||
|
||
|
||
on: | ||
pull_request: | ||
branches: [main, preview] | ||
|
||
|
||
jobs: | ||
build_status_check: | ||
name: ${{ vars.PROJECT_NAME }} Build Status Check | ||
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected] | ||
with: | ||
project-name: "${{ vars.PROJECT_NAME }}" | ||
build-config: Debug | ||
net-sdk-version: "${{ vars.NET_SDK_VERSION }}" |
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,61 @@ | ||
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: Dry Run - Check to run the workflow without creating a release. | ||
required: false | ||
default: false | ||
type: boolean | ||
|
||
|
||
jobs: | ||
determine_release_notes_path: | ||
name: Determine Release Notes Dir Path | ||
runs-on: ubuntu-latest | ||
outputs: | ||
release-notes-dir-path: ${{ steps.get-dir-path.outputs.release-notes-dir-path }} | ||
steps: | ||
- name: Get Dir Path | ||
id: get-dir-path | ||
run: | | ||
$dirPath = "${{ inputs.release-type }}" -eq "Production" ? "${{ vars.PROD_RELATIVE_RELEASE_NOTES_DIR_PATH }}" : "${{ vars.PREV_RELATIVE_RELEASE_NOTES_DIR_PATH }}"; | ||
"release-notes-dir-path=$dirPath" >> $env:GITHUB_OUTPUT; | ||
run_release: | ||
name: Performing ${{ inputs.release-type }} Release of ${{ vars.PROJECT_NAME }} (${{ inputs.release-type == 'Production' && 'Release' || 'Debug' }}) | ||
needs: determine_release_notes_path | ||
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected] | ||
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: "${{ needs.determine_release_notes_path.outputs.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: 🤖Sync Bot | ||
|
||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
|
||
on: | ||
issues: | ||
types: [labeled, unlabeled, assigned, unassigned, milestoned, demilestoned] | ||
|
||
|
||
jobs: | ||
sync_bot: | ||
name: Sync Bot Status Check | ||
if: ${{ !github.event.issue.pull_request }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set Up Deno | ||
if: startsWith(github.ref_name, 'feature/') | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
|
||
- name: Run Sync Bot (Issue Change) | ||
if: startsWith(github.ref_name, 'feature/') | ||
run: | | ||
$scriptUrl = "${{ vars.SCRIPT_BASE_URL }}/${{ vars.CICD_SCRIPTS_VERSION }}/${{ vars.SCRIPT_RELATIVE_DIR_PATH}}/sync-bot-status-check.ts"; | ||
$issueNumber = "${{ github.event.issue.number }}"; | ||
Write-Host "::notice::Project Name: ${{ vars.PROJECT_NAME }}"; | ||
Write-Host "::notice::Issue: $issueNumber"; | ||
if ($manuallyExecuted -and $issueNumber -eq "0") { | ||
Write-Host "::notice::The issue or PR number must be a value greater than 0."; | ||
exit 1; | ||
} | ||
<# Deno Args: | ||
1. Organization name | ||
2. Project name | ||
3. Issue number | ||
4. Event Type - set to issue event type | ||
5. PAT | ||
#> | ||
deno run ` | ||
--allow-net ` | ||
"$scriptUrl" ` | ||
"${{ vars.PROJECT_NAME }}" ` | ||
"$issueNumber" ` | ||
"issue" ` | ||
"${{ secrets.CICD_TOKEN }}"; |
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,55 @@ | ||
name: 🔄️Sync Issue To PR | ||
|
||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
|
||
on: | ||
pull_request: | ||
types: opened | ||
issue_comment: # This event is triggered when creating issue and pr comments | ||
types: created | ||
|
||
|
||
jobs: | ||
sync_issue_to_pr: | ||
name: Start Sync Process | ||
if: | | ||
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '[run-sync]')) || | ||
github.event_name == 'pull_request' && startsWith(github.head_ref, 'feature/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set Up Deno | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
|
||
- name: Sync | ||
run: | | ||
$eventName = "${{ github.event_name }}"; | ||
$scriptUrl = "${{ vars.SCRIPT_BASE_URL }}/${{ vars.CICD_SCRIPTS_VERSION }}/${{ vars.SCRIPT_RELATIVE_DIR_PATH }}/sync-issue-to-pr.ts"; | ||
$issueOrPrNumber = $eventName -eq "pull_request" ? "${{ github.event.number }}" : "${{ github.event.issue.number }}"; | ||
Write-Host "::notice::Event Type: $eventName"; | ||
Write-Host "::notice::Organization Name: ${{ vars.ORGANIZATION_NAME }}"; | ||
Write-Host "::notice::Project Name: ${{ vars.PROJECT_NAME }}"; | ||
Write-Host "::notice::Requested By: ${{ github.event.sender.login }}"; | ||
Write-Host "::notice::PR Number: $issueOrPrNumber"; | ||
<# Deno Args: | ||
1. Organization name | ||
2. Project name | ||
3. Triggered by user | ||
4. Issue or pull request number | ||
5. PAT | ||
#> | ||
deno run ` | ||
--allow-net ` | ||
"$scriptUrl" ` | ||
"${{ vars.ORGANIZATION_NAME }}" ` | ||
"${{ vars.PROJECT_NAME }}" ` | ||
"${{ github.event.sender.login }}" ` | ||
"$issueOrPrNumber" ` | ||
"${{ secrets.CICD_TOKEN }}"; |
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,53 @@ | ||
name: ✅Sync Status Check | ||
|
||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
|
||
on: | ||
pull_request: | ||
branches: [main, preview] | ||
|
||
|
||
jobs: | ||
sync_status_check: | ||
name: Sync Status Check | ||
if: startsWith(github.head_ref, 'feature/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set Up Deno | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
|
||
- name: Run Sync Status Check | ||
run: | | ||
$scriptUrl = "${{ vars.SCRIPT_BASE_URL }}/${{ vars.CICD_SCRIPTS_VERSION }}/${{ vars.SCRIPT_RELATIVE_DIR_PATH}}/sync-bot-status-check.ts"; | ||
$prNumber = "${{ github.event.number }}"; | ||
Write-Host "::notice::Project Name: ${{ vars.PROJECT_NAME }}"; | ||
Write-Host "::notice::PR Number: $prNumber"; | ||
Write-Host "::notice::Event Type: pr"; | ||
if ($manuallyExecuted -and $prNumber -eq "0") { | ||
Write-Host "::notice::The issue or PR number must be a value greater than 0."; | ||
exit 1; | ||
} | ||
<# Deno Args: | ||
1. Organization name | ||
2. Project name | ||
3. Pull request number | ||
4. Event Type - set to pull request event type | ||
5. PAT | ||
#> | ||
deno run ` | ||
--allow-net ` | ||
"$scriptUrl" ` | ||
"${{ vars.ORGANIZATION_NAME }}" ` | ||
"${{ vars.PROJECT_NAME }}" ` | ||
"$prNumber" ` | ||
"pr" ` | ||
"${{ secrets.CICD_TOKEN }}"; |
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,21 @@ | ||
name: 🤖Triage Issue | ||
|
||
|
||
on: | ||
issues: | ||
types: [opened] | ||
|
||
|
||
jobs: | ||
label_issues: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Label issues | ||
uses: andymckay/[email protected] | ||
with: | ||
add-labels: "⚕️NEEDS TRIAGE" | ||
ignore-if-assigned: true | ||
ignore-if-labeled: true | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} |
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,18 @@ | ||
name: ✅Unit Testing Status Check | ||
run-name: ✅Unit Testing Status Check (${{ github.base_ref }} branch) | ||
|
||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main, preview] | ||
|
||
|
||
jobs: | ||
run_tests: | ||
name: ${{ vars.PROJECT_NAME }} Test Status Check | ||
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected] | ||
with: | ||
project-name: "${{ vars.PROJECT_NAME }}Tests" | ||
build-config: Debug | ||
net-sdk-version: "${{ vars.NET_SDK_VERSION }}" |
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