Skip to content

Commit 38f46d4

Browse files
Merge branch 'develop'
2 parents 47a9a5f + ab8f689 commit 38f46d4

18 files changed

Lines changed: 241 additions & 20 deletions
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ jobs:
2020
id: Create_Issue_Branch
2121
uses: robvanderleek/create-issue-branch@main
2222
env:
23-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
$(if [[ "${{ github.event.inputs.is_prerelease }}" == "true" ]]; then echo "--prerelease"; fi) \
5555
$(if [[ "${{ github.ref }}" == "refs/heads/main" ]]; then echo "--latest"; fi)
5656
env:
57-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
name: Unit Tests
2727
path: "*.trx"
2828
reporter: dotnet-trx
29-
fail-on-error: false
29+
fail-on-error: false

.github/workflows/Unlist Nuget.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Unlist NuGet
2+
3+
on:
4+
workflow_dispatch:
5+
# release:
6+
# types: [deleted]
7+
8+
env:
9+
BRANCH_NAME: ${{ github.event.release.target_commitish }}
10+
PROJECT_NAME: ${{ vars.PROJECT_NAME }}
11+
12+
jobs:
13+
publish:
14+
name: unlist on nuget
15+
runs-on: windows-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
# Unlist
21+
- name: Unlist Deleted Tag
22+
uses: darenm/unlist-nuget@v1
23+
with:
24+
NUGET_PACKAGE: ${{ env.PROJECT_NAME }} # Full Package ID
25+
VERSION_REGEX: ${{ github.event.release.tag_name }} # Regex pattern to match version
26+
NUGET_KEY: ${{ secrets.NUGET_API_KEY }} # nuget.org API key
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Update Version
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version_type:
7+
description: 'Update branch version by:'
8+
type: choice
9+
options:
10+
- major
11+
- minor
12+
- patch
13+
required: true
14+
default: 'patch'
15+
16+
env:
17+
ALLOW_UPDATES: ${{ startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/hotfix/') }}
18+
19+
jobs:
20+
update-version:
21+
runs-on: ubuntu-latest
22+
outputs:
23+
version_tag: ${{ env.version_tag }}
24+
previous_version_tag: ${{ env.previous_version_tag }}
25+
26+
steps:
27+
- name: Check For Valid Updates
28+
if: env.ALLOW_UPDATES == false
29+
run: |
30+
echo "Version updates should only be done on development or hotfix"
31+
exit 1
32+
33+
- name: Checkout Code
34+
uses: actions/checkout@v4
35+
36+
- name: Run Update Version
37+
id: set_version
38+
shell: pwsh
39+
run: |
40+
Import-Module ./solution-helper.psm1 -Force
41+
$previousVersion, $newVersion = Update-Version -type ${{ github.event.inputs.version_type }}
42+
echo "version_tag=$newVersion" | Out-File -FilePath $env:GITHUB_ENV -Append
43+
echo "previous_version_tag=$previousVersion" | Out-File -FilePath $env:GITHUB_ENV -Append
44+
45+
- name: Check for Existing Release
46+
run: |
47+
compare_versions() {
48+
echo -e "$1\n$2" | sort -V | tail -n 1
49+
}
50+
51+
# Fetch the list of releases
52+
releases=$(gh release list --json createdAt,tagName --limit 100)
53+
echo -e "$releases"
54+
55+
# Sort the releases by date and extract the most recent one
56+
latest_release=$(echo "$releases" | jq -r 'sort_by(.createdAt) | reverse | .[0] | .tagName')
57+
echo -e "$latest_release"
58+
59+
greater_version=$(compare_versions $latest_release $version_tag)
60+
61+
if [ "$greater_version" = "$version_tag" ]; then
62+
echo "✅ $version_tag is greater than $latest_release"
63+
elif [ "$greater_version" = "$latest_release" ]; then
64+
echo "⛔ $version_tag is less than $latest_release"
65+
exit 1
66+
else
67+
echo "⚠️ Versions are equal"
68+
exit 1
69+
fi
70+
env:
71+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
73+
- name: Update Version Number
74+
run: |
75+
git config --global user.name '${{ github.triggering_actor }}'
76+
git config --global user.email '${{ github.triggering_actor }}@users.noreply.github.com'
77+
git commit -am "Previous version was '${{ env.previous_version_tag }}'. Version now '${{ env.version_tag }}'."
78+
git push

Hyperbee.Resources.sln

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1414
EndProject
1515
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Tests", "Solution Tests", "{3578FD7E-CD36-4C2B-974C-52C56F7B60AB}"
1616
EndProject
17-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{0837D817-CA17-4D78-8767-806079D4F0F0}"
18-
ProjectSection(SolutionItems) = preProject
19-
todo.md = todo.md
20-
EndProjectSection
21-
EndProject
2217
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{2D48C1F2-0FEE-4311-9A47-D547166735A3}"
2318
ProjectSection(SolutionItems) = preProject
2419
.github\dependabot.yml = .github\dependabot.yml
@@ -29,17 +24,20 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperbee.Resources", "src\H
2924
EndProject
3025
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3F11E2F8-DDBB-4CEC-8364-ADBC05A17E9D}"
3126
ProjectSection(SolutionItems) = preProject
32-
.github\workflows\create-release.yml = .github\workflows\create-release.yml
33-
.github\workflows\format.yml = .github\workflows\format.yml
34-
.github\workflows\issue-branch.yml = .github\workflows\issue-branch.yml
35-
.github\workflows\publish.yml = .github\workflows\publish.yml
36-
.github\workflows\test-report.yml = .github\workflows\test-report.yml
37-
.github\workflows\test.yml = .github\workflows\test.yml
38-
.github\workflows\unlist-nuget.yml = .github\workflows\unlist-nuget.yml
27+
.github\workflows\Create Issue Branch.yml = .github\workflows\Create Issue Branch.yml
28+
.github\workflows\Create Release.yml = .github\workflows\Create Release.yml
29+
.github\workflows\Format.yml = .github\workflows\Format.yml
30+
.github\workflows\Publish.yml = .github\workflows\Publish.yml
31+
.github\workflows\Test Report.yml = .github\workflows\Test Report.yml
32+
.github\workflows\Test.yml = .github\workflows\Test.yml
33+
.github\workflows\Unlist Nuget.yml = .github\workflows\Unlist Nuget.yml
34+
.github\workflows\Update Version.yml = .github\workflows\Update Version.yml
3935
EndProjectSection
4036
EndProject
4137
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Hyperbee.Resources.Tests", "test\Hyperbee.Resources.Tests\Hyperbee.Resources.Tests.csproj", "{C9DFA58D-268B-4CCD-807C-ECB81053856B}"
4238
EndProject
39+
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "docs", "docs\docs.shproj", "{0CBE4E5F-4F8C-40C8-84FC-1BFE89E9018D}"
40+
EndProject
4341
Global
4442
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4543
Debug|Any CPU = Debug|Any CPU
@@ -59,12 +57,15 @@ Global
5957
HideSolutionNode = FALSE
6058
EndGlobalSection
6159
GlobalSection(NestedProjects) = preSolution
62-
{0837D817-CA17-4D78-8767-806079D4F0F0} = {D9648393-6F08-43BB-A860-CE7E5518E23F}
6360
{2D48C1F2-0FEE-4311-9A47-D547166735A3} = {D9648393-6F08-43BB-A860-CE7E5518E23F}
6461
{3F11E2F8-DDBB-4CEC-8364-ADBC05A17E9D} = {2D48C1F2-0FEE-4311-9A47-D547166735A3}
6562
{C9DFA58D-268B-4CCD-807C-ECB81053856B} = {3578FD7E-CD36-4C2B-974C-52C56F7B60AB}
63+
{0CBE4E5F-4F8C-40C8-84FC-1BFE89E9018D} = {D9648393-6F08-43BB-A860-CE7E5518E23F}
6664
EndGlobalSection
6765
GlobalSection(ExtensibilityGlobals) = postSolution
6866
SolutionGuid = {D1BE373C-31C9-468E-8DCC-7C214765266B}
6967
EndGlobalSection
68+
GlobalSection(SharedMSBuildProjectFiles) = preSolution
69+
docs\docs.projitems*{0cbe4e5f-4f8c-40c8-84fc-1bfe89e9018d}*SharedItemsImports = 13
70+
EndGlobalSection
7071
EndGlobal

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Provides a dependency injection pattern for embedded resources
55

66
# Build Requirements
77

8-
* To build and run this project, **.NET 8 SDK** is required.
9-
* Ensure your development tools are compatible with .NET 8.
8+
* To build and run this project, **.NET 9 SDK** is required.
9+
* Ensure your development tools are compatible with .NET 9.
1010

1111
## Building the Project
1212

0 commit comments

Comments
 (0)