-
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.
Closes #99
- Loading branch information
Showing
27 changed files
with
770 additions
and
120 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# -*- mode: yaml -*- | ||
|
||
manifest: | ||
version: 1.0 | ||
|
||
automations: | ||
estimated_time_to_review: | ||
if: | ||
- true | ||
run: | ||
- action: add-label@v1 | ||
args: | ||
label: "{{ calc.etr }} min review" | ||
color: {{ 'E94637' if (calc.etr >= 20) else ('FBBD10' if (calc.etr >= 5) else '36A853') }} | ||
|
||
calc: | ||
etr: {{ branch | estimatedReviewTime }} |
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,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 }} |
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,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 }} |
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: 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 }} |
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,58 @@ | ||
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 }} | ||
|
||
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 }} |
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: 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" |
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,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 }} |
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,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 }} |
Oops, something went wrong.