Skip to content

Commit

Permalink
Merge pull request #327 from baynezy/feature/issue-326-dotnet-eight
Browse files Browse the repository at this point in the history
Upgrade to .Net 8
  • Loading branch information
baynezy authored Dec 7, 2023
2 parents 2a93ca5 + e879007 commit f9d50b7
Show file tree
Hide file tree
Showing 28 changed files with 801 additions and 57 deletions.
8 changes: 0 additions & 8 deletions .cm/gitstream.cm
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ automations:
args:
label: "{{ calc.etr }} min review"
color: {{ 'E94637' if (calc.etr >= 20) else ('FBBD10' if (calc.etr >= 5) else '36A853') }}

dependabot_auto_merge:
if:
- {{ pr.author | includes(term='dependabot')}}
run:
- action: merge@v1
args:
wait_for_all_checks: true

calc:
etr: {{ branch | estimatedReviewTime }}
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,11 @@ updates:
interval: "daily"
labels:
- "dependencies"
open-pull-requests-limit: 10

- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "daily"
labels:
- "dependencies"
66 changes: 66 additions & 0 deletions .github/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
- name: "breaking change"
color: "ff0205"
description: "This change will require a major version bump"
- name: "bug"
color: "d73a4a"
description: "Something isn't working"
- name: "dependencies"
color: "0366d6"
description: "Pull requests that update a dependency file"
- name: "documentation"
color: "0075ca"
description: "Improvements or additions to documentation"
- name: "duplicate"
color: "cfd3d7"
description: "This issue or pull request already exists"
- name: "environment"
color: "703E17"
description: "Improvement, to infra or build environment"
- name: "feature"
color: "fbca04"
description: "A new business feature"
- name: "in progress"
color: "5ae1c2"
description: "In flight work"
- name: "next release"
color: "5319e7"
description: "Completed work that is yet to be deployed"
- name: "technical debt"
color: "c19337"
description: "An issue describing some techinal debt that needs to be addressed in the future"
- name: "to do"
color: "fbca04"
description: "Work that is yet to be started"
- name: "question"
color: "d876e3"
description: "Further information is requested"
- name: "wontfix"
color: "ffffff"
description: "The project maintainers have decided this will not be worked on"
- name: "request"
color: "0366d6"
description: "A request for a new feature or enhancement"
- name: "awaiting review"
color: "fbca04"
description: "This pull request is awaiting review"
- name: "scheme:onenote"
color: "61259f"
description: "This issue relates to the OneNote scheme"
- name: "scheme:github-flavored-markdown"
color: "000000"
description: "This issue relates to the GitHub Flavored Markdown scheme"
- name: "scheme:commonmark"
color: "07ff8f"
description: "This issue relates to the CommonMark scheme"
- name: "priority:critical"
color: "b60205"
description: "This issue is critical to the business"
- name: "priority:high"
color: "d93f0b"
description: "This issue is high priority"
- name: "priority:medium"
color: "fbca04"
description: "This issue is medium priority"
- name: "priority:low"
color: "0e8a16"
description: "This issue is low priority"
36 changes: 36 additions & 0 deletions .github/workflows/blocked-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Blocked Issue Labeler

on:
issues:
types:
- opened
- edited
issue_comment:
types:
- created
- edited

jobs:
add-blocked-label:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Add blocked label if issue is blocked
run: |
body=$BODY
comment=$COMMENT
issue_number=${{ github.event.issue.number }}
# if body contains "blocked" or comment contains "blocked"
# add label "blocked"
if [[ "${body,,}" == *"blocked"* ]] || [[ "${comment,,}" == *"blocked"* ]]; then
echo "Issue is blocked"
echo "Adding blocked label"
gh issue edit $issue_number --add-label blocked
fi
env:
BODY: ${{ github.event.issue.body }}
COMMENT: ${{ github.event.comment.body }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/branch-develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy Develop Branch

on:
push:
branches:
- develop
paths:
- 'src/**'
- 'test/**'
- '**.sln'
- '**.cake'
- '.github/workflows/branch-develop.yml'
- '.github/workflows/step-*.yml'
workflow_dispatch:

jobs:
get-version:
uses: ./.github/workflows/step-version.yml

build:
needs: [get-version]
uses: ./.github/workflows/step-build.yml
secrets: inherit
with:
version: ${{ needs.get-version.outputs.version }}
checkout-ref: ${{ github.base_ref }}
36 changes: 36 additions & 0 deletions .github/workflows/branch-feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy Feature Branch

on:
pull_request:
types: [opened, synchronize]
branches:
- develop
paths:
- 'src/**'
- 'test/**'
- '**.sln'
- '**.cake'
- '.github/workflows/branch-feature.yml'
- '.github/workflows/step-*.yml'
workflow_dispatch:

jobs:
get-version:
if: startsWith(github.head_ref, 'feature/') || github.head_ref == 'master'
uses: ./.github/workflows/step-version.yml
secrets: inherit
with:
is-pre-release: true

build:
needs: [get-version]
uses: ./.github/workflows/step-build.yml
secrets: inherit
with:
version: ${{ needs.get-version.outputs.version }}
checkout-ref: ${{ github.head_ref }}

check-markdown:
needs: [get-version]
uses: ./.github/workflows/step-check-markdown.yml
secrets: inherit
63 changes: 63 additions & 0 deletions .github/workflows/branch-hotfix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy HotFix Branch

on:
pull_request:
types: [opened, synchronize]
branches:
- master
workflow_dispatch:

jobs:
get-version:
if: startsWith(github.head_ref, 'hotfix/')
uses: ./.github/workflows/step-version.yml

build:
needs: [get-version]
uses: ./.github/workflows/step-build.yml
secrets: inherit
with:
version: ${{ needs.get-version.outputs.version }}
checkout-ref: ${{ github.head_ref }}

check-markdown:
needs: [get-version]
uses: ./.github/workflows/step-check-markdown.yml
secrets: inherit

update-metadata:
if: github.event.action == 'opened'
needs: [get-version]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Increment Version
id: increment_version
run: |
echo "patch_version=$(($(cat semver.json | jq -r '.patch')+1))" > $GITHUB_OUTPUT
- name: Store New Version
uses: RadovanPelka/[email protected]
with:
path: semver.json
replaceWith: |
{
"major": "${{ needs.get-version.outputs.major }}",
"minor": "${{ needs.get-version.outputs.minor }}",
"patch": "${{ steps.increment_version.outputs.patch_version }}",
"build": "${{ github.run_number }}"
}
- name: Update changelog
uses: thomaseizinger/[email protected]
with:
tag: ${{ needs.get-version.outputs.major }}.${{ needs.get-version.outputs.minor }}.${{ steps.increment_version.outputs.patch_version }}.${{ github.run_number }}
- name: Commit Changes
run: |
git config --global user.name "GitHub Action Bot"
git config --global user.email "[email protected]"
git add CHANGELOG.md semver.json
git commit --message "Bump Version to ${{ needs.get-version.outputs.major }}.${{ needs.get-version.outputs.minor }}.${{ steps.increment_version.outputs.patch_version }}.${{ github.run_number }}"
- name: Push Version
run: git push origin ${{ github.head_ref }}
53 changes: 53 additions & 0 deletions .github/workflows/branch-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy Master Branch

on:
push:
branches:
- master
workflow_dispatch:

jobs:
get-version:
uses: ./.github/workflows/step-version.yml
with:
static-build: true

build:
needs: [get-version]
uses: ./.github/workflows/step-build.yml
secrets: inherit
with:
version: ${{ needs.get-version.outputs.version }}
checkout-ref: ${{ github.base_ref }}

publish-to-nuget:
needs: [get-version,build]
uses: ./.github/workflows/step-publish.yml
secrets: inherit
with:
deploy-env: nuget
deploy-branch: ${{ github.base_ref }}
version: ${{ needs.get-version.outputs.version }}

tag-release:
needs: [get-version,publish-to-nuget]
uses: ./.github/workflows/step-tag-release.yml
with:
version: ${{ needs.get-version.outputs.version }}

merge-master-to-develop:
needs: [publish-to-nuget]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create Pull Request
env:
GH_TOKEN: ${{ secrets.CREATE_PR_TOKEN }}
run: |
echo -e "This PR merges the master branch back into develop.\nThis happens to ensure that the updates that happened on the release branch, i.e. CHANGELOG updates are also present on the develop branch." > msg.txt
export msg=$(cat msg.txt) ; gh pr create \
--head master \
--base develop \
--title "Merge master into develop branch" \
--body "$msg"
29 changes: 29 additions & 0 deletions .github/workflows/branch-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy Release Branch

on:
pull_request:
types: [opened, synchronize]
branches:
- master
- develop
paths:
- 'src/**'
- 'test/**'
- '**.sln'
- '**.cake'
- '.github/workflows/branch-release.yml'
- '.github/workflows/step-*.yml'
workflow_dispatch:

jobs:
get-version:
if: startsWith(github.head_ref, 'release/')
uses: ./.github/workflows/step-version.yml

build:
needs: [get-version]
uses: ./.github/workflows/step-build.yml
secrets: inherit
with:
version: ${{ needs.get-version.outputs.version }}
checkout-ref: ${{ github.head_ref }}
24 changes: 24 additions & 0 deletions .github/workflows/completed-feature-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Completed Feature Workflow

on:
pull_request:
branches: [ develop ]
types: [closed]

jobs:
update-merged-issue-issues:
if: github.event.pull_request.merged_by != '' && github.actor != 'dependabot[bot]' && startsWith(github.head_ref, 'feature/issue-')
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Extract Issue Number
shell: bash
run: echo "##[set-output name=issue;]$(echo ${{ github.event.pull_request.head.ref }} | sed 's|[^0-9]||g')"
id: extract_issue
- name: Output Issue Number
run: echo "Issue Number- ${{ steps.extract_issue.outputs.issue }}"
- name: Update Labels
run: gh issue edit ${{ steps.extract_issue.outputs.issue }} --add-label "next release" --remove-label "in progress"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit f9d50b7

Please sign in to comment.