Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
varndellwagglebee committed Nov 18, 2024
2 parents 7e9a15b + f45060e commit ada676a
Show file tree
Hide file tree
Showing 30 changed files with 1,048 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
- develop

env:
DOTNET_VERSION: '8.0.x'
DOTNET_VERSION: '9.0.x'

jobs:
format:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
env:
BRANCH_NAME: ${{ github.event.release.target_commitish }}
SOLUTION_NAME: ${{ vars.SOLUTION_NAME }}
DOTNET_VERSION: '8.0.x'
DOTNET_VERSION: '9.0.x'
NUGET_SOURCE: 'https://api.nuget.org/v3/index.json'
BUILD_CONFIGURATION: ''
VERSION_SUFFIX: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
SOLUTION_NAME: ${{ vars.SOLUTION_NAME }}
DOTNET_VERSION: '8.0.x'
DOTNET_VERSION: '9.0.x'

jobs:
test:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/unlist-nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Unlist NuGet

on:
workflow_dispatch:
# release:
# types: [deleted]

env:
BRANCH_NAME: ${{ github.event.release.target_commitish }}
PROJECT_NAME: ${{ vars.PROJECT_NAME }}

jobs:
publish:
name: unlist on nuget
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

# Unlist
- name: Unlist Deleted Tag
uses: darenm/unlist-nuget@v1
with:
NUGET_PACKAGE: ${{ env.PROJECT_NAME }} # Full Package ID
VERSION_REGEX: ${{ github.event.release.tag_name }} # Regex pattern to match version
NUGET_KEY: ${{ secrets.NUGET_API_KEY }} # nuget.org API key
78 changes: 78 additions & 0 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Update Version

on:
workflow_dispatch:
inputs:
version_type:
description: 'Update branch version by:'
type: choice
options:
- major
- minor
- patch
required: true
default: 'patch'

env:
ALLOW_UPDATES: ${{ startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/hotfix/') }}

jobs:
update-version:
runs-on: ubuntu-latest
outputs:
version_tag: ${{ env.version_tag }}
previous_version_tag: ${{ env.previous_version_tag }}

steps:
- name: Check For Valid Updates
if: env.ALLOW_UPDATES == false
run: |
echo "Version updates should only be done on development or hotfix"
exit 1
- name: Checkout Code
uses: actions/checkout@v4

- name: Run Update Version
id: set_version
shell: pwsh
run: |
Import-Module ./solution-helper.psm1 -Force
$previousVersion, $newVersion = Update-Version -type ${{ github.event.inputs.version_type }}
echo "version_tag=$newVersion" | Out-File -FilePath $env:GITHUB_ENV -Append
echo "previous_version_tag=$previousVersion" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Check for Existing Release
run: |
compare_versions() {
echo -e "$1\n$2" | sort -V | tail -n 1
}
# Fetch the list of releases
releases=$(gh release list --json createdAt,tagName --limit 100)
echo -e "$releases"
# Sort the releases by date and extract the most recent one
latest_release=$(echo "$releases" | jq -r 'sort_by(.createdAt) | reverse | .[0] | .tagName')
echo -e "$latest_release"
greater_version=$(compare_versions $latest_release $version_tag)
if [ "$greater_version" = "$version_tag" ]; then
echo "✅ $version_tag is greater than $latest_release"
elif [ "$greater_version" = "$latest_release" ]; then
echo "⛔ $version_tag is less than $latest_release"
exit 1
else
echo "⚠️ Versions are equal"
exit 1
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update Version Number
run: |
git config --global user.name '${{ github.triggering_actor }}'
git config --global user.email '${{ github.triggering_actor }}@users.noreply.github.com'
git commit -am "Previous version was '${{ env.previous_version_tag }}'. Version now '${{ env.version_tag }}'."
git push
12 changes: 7 additions & 5 deletions Hyperbee.Migrations.sln
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
.github\workflows\publish.yml = .github\workflows\publish.yml
.github\workflows\test-report.yml = .github\workflows\test-report.yml
.github\workflows\test.yml = .github\workflows\test.yml
unlist-nuget.yml = unlist-nuget.yml
update-version.yml = update-version.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{FAE7F244-124F-4BCB-8EA6-049BEE4991B9}"
ProjectSection(SolutionItems) = preProject
todo.md = todo.md
EndProjectSection
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "docs", "docs\docs.shproj", "{5A1580F9-6806-401E-9CAB-AC876DB070FD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down Expand Up @@ -130,9 +129,12 @@ Global
{C4B50B74-3FCA-453E-AF19-D9EA9233F8FC} = {17F0B438-3EBD-4566-9A22-7A5EC4AEAF3D}
{004E4E55-FA1C-49D0-865F-4FF238C7A1F3} = {5A09B7FE-D694-45B5-BCBC-256A8E06CFC5}
{A192B3D2-E452-4A85-BBA4-1A8499F1A056} = {004E4E55-FA1C-49D0-865F-4FF238C7A1F3}
{FAE7F244-124F-4BCB-8EA6-049BEE4991B9} = {5A09B7FE-D694-45B5-BCBC-256A8E06CFC5}
{5A1580F9-6806-401E-9CAB-AC876DB070FD} = {5A09B7FE-D694-45B5-BCBC-256A8E06CFC5}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {97071D77-035B-4126-AD4E-DE150E318714}
EndGlobalSection
GlobalSection(SharedMSBuildProjectFiles) = preSolution
docs\docs.projitems*{5a1580f9-6806-401e-9cab-ac876db070fd}*SharedItemsImports = 13
EndGlobalSection
EndGlobal
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ public class PeopleHaveFullNames : Migration // #2 inherit from Migration

# Build Requirements

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

## Building the Solution

* With .NET 8 SDK installed, you can build the solution using the standard `dotnet build` command.
* With .NET 9 SDK installed, you can build the solution using the standard `dotnet build` command.


# Status
Expand Down
File renamed without changes.
26 changes: 26 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
title: Hyperbee Migrations
description: Documentation for Hyperbee Migrations.
remote_theme: pmarsceill/just-the-docs
baseurl: "/hyperbee.migrations/"
url: "https://stillpoint-software.github.io"

aux_links:
"GitHub Repository":
- "//github.com/Stillpoint-Software/hyperbee.migrations"

footer_content: |
<div>
<span>&copy; <span id="copyright-year"></span> <a href='https://www.stillpointsoftware.net/'>Stillpoint Software</a>.</span>
<script>
document.getElementById("copyright-year").textContent = new Date().getFullYear();
</script>
</div>
# logo: "/assets/icon.png"
search_enabled: true # Enable search

# External navigation links
nav_external_links:
- title: Stillpoint Software
url: https://www.stillpointsoftware.net/
opens_in_new_tab: true
3 changes: 3 additions & 0 deletions docs/_includes/nav_footer_custom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<footer class="site-footer">
Hyperbee Migration Docs
</footer>
Loading

0 comments on commit ada676a

Please sign in to comment.