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.
Merge branch 'preview/v1.0.0-preview.15' into main
- Loading branch information
Showing
109 changed files
with
4,622 additions
and
400 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,18 @@ | ||
name: 🤖Add New Issue To Project | ||
|
||
|
||
on: | ||
issues: | ||
types: opened | ||
|
||
|
||
jobs: | ||
add_new_issue_to_project: | ||
name: Add New Issue | ||
uses: KinsonDigital/Infrastructure/.github/workflows/add-issue-to-project.yml@v9.1.0 | ||
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,32 @@ | ||
name: ✅Build Status Check | ||
run-name: ✅Build Status Check ${{ github.base_ref == 'main' && '(Release Build)' || '(Debug Build)' }} | ||
|
||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main, preview] | ||
|
||
|
||
jobs: | ||
main_build_status_check: | ||
name: ${{ vars.PROJECT_NAME }} Build Status Check | ||
uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v9.1.0 | ||
with: | ||
project-name: "${{ vars.PROJECT_NAME }}" | ||
build-config: Debug | ||
net-sdk-version: "${{ vars.NET_SDK_VERSION }}" | ||
|
||
|
||
perf_build_status_check: | ||
name: ${{ vars.PROJECT_NAME }} Perf Tests Build Status Check | ||
uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v9.1.0 | ||
with: | ||
project-name: "${{ vars.PROJECT_NAME }}PerfTests" | ||
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,31 @@ | ||
name: 🚀Preview Release | ||
|
||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
|
||
on: | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
preview_release: | ||
name: Preview Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Restore DotNet Tools | ||
run: dotnet tool restore | ||
|
||
- name: Run Preview Release | ||
run: dotnet cicd PreviewRelease --skip-twitter-announcement | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NugetOrgApiKey: ${{ secrets.NUGET_ORG_API_KEY }} | ||
TwitterConsumerApiKey: ${{ secrets.TWITTER_CONSUMER_API_KEY }} | ||
TwitterConsumerApiSecret: ${{ secrets.TWITTER_CONSUMER_API_SECRET }} | ||
TwitterAccessToken: ${{ secrets.TWITTER_ACCESS_TOKEN }} | ||
TwitterAccessTokenSecret: ${{ 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,66 @@ | ||
name: ✅Sonar Scan Status Check | ||
|
||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [main, preview] | ||
|
||
|
||
jobs: | ||
sonar_analyze_code: | ||
name: Analyze Code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: 11 | ||
distribution: 'zulu' # Alternative distribution options are available. | ||
|
||
- uses: actions/setup-dotnet@v3 | ||
name: Setup dotnet | ||
with: | ||
dotnet-version: '7.x.x' | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
|
||
- name: Cache SonarCloud scanner | ||
id: cache-sonar-scanner | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./.sonar/scanner | ||
key: ${{ runner.os }}-sonar-scanner | ||
restore-keys: ${{ runner.os }}-sonar-scanner | ||
|
||
- name: Install SonarCloud scanner | ||
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' | ||
run: | | ||
New-Item -Path ./.sonar/scanner -ItemType Directory | ||
dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner | ||
- name: Build and Analyze | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: | | ||
./.sonar/scanner/dotnet-sonarscanner begin /k:"KinsonDigital_Carbonate" /o:"kinsondigital" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" | ||
dotnet clean "${{ github.workspace }}/Carbonate/Carbonate.csproj"; | ||
dotnet build "${{ github.workspace }}/Carbonate/Carbonate.csproj" -c Debug; | ||
./.sonar/scanner/dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_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,51 @@ | ||
name: 🤖Sync Bot | ||
|
||
|
||
defaults: | ||
run: | ||
shell: pwsh | ||
|
||
|
||
on: | ||
issues: | ||
types: [labeled, unlabeled, assigned, unassigned, milestoned, demilestoned] | ||
|
||
|
||
jobs: | ||
sync_bot: | ||
name: Sync Bot | ||
if: ${{ !github.event.issue.pull_request }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set Up Deno | ||
uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
|
||
- name: Run Sync Bot (Issue Change) | ||
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 "::error::The issue or PR number must be a value greater than 0."; | ||
exit 1; | ||
} | ||
<# Deno Args: | ||
1. Project name | ||
2. Issue number | ||
3. Event type - set to issue event type | ||
4. PAT | ||
#> | ||
deno run ` | ||
--allow-net ` | ||
"$scriptUrl" ` | ||
"${{ vars.PROJECT_NAME }}" ` | ||
"$issueNumber" ` | ||
"issue" ` | ||
"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,59 @@ | ||
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' || | ||
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"; | ||
$prNumber = $eventName -eq "pull_request" ? "${{ github.event.number }}" : "${{ github.event.issue.number }}"; | ||
$command = $eventName -eq "issue_comment" ? "${{ github.event.comment.body }}" : "[initial-sync]"; | ||
Write-Host "::notice::Event Name: $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: $prNumber"; | ||
Write-Host "::notice::Comment: $command"; | ||
<# Deno Args: | ||
1. Organization name | ||
2. Project name | ||
3. Login name of the user making the issue change | ||
4. Pull request number | ||
5. The sync command - Either '[initial-sync]' or '[run-sync]' | ||
6. PAT | ||
#> | ||
deno run ` | ||
--allow-net ` | ||
"$scriptUrl" ` | ||
"${{ vars.ORGANIZATION_NAME }}" ` | ||
"${{ vars.PROJECT_NAME }}" ` | ||
"${{ github.event.sender.login }}" ` | ||
"$prNumber" ` | ||
"$command" ` | ||
"${{ secrets.CICD_TOKEN }}"; |
Oops, something went wrong.