diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 08fdadc..8249f45 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -6,6 +6,7 @@ on: description: 'Tag name:' type: string required: true +run-name: "Generating changelog for Release v${{github.event.inputs.tagName}}" jobs: generate_changelog: runs-on: ubuntu-latest @@ -18,11 +19,13 @@ jobs: - name: Setup .NET uses: actions/setup-dotnet@v1 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' - name: Update Project Versions - run: sed -i "s/\(\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj" + run: sed -i "s/\(\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj" + - name: Update Project Versions - run: sed -i "s/\(\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj" + run: sed -i "s/\(\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj" + - name: Build and Run Changelog Generator run: dotnet run --project "./OmegaLeo.HelperLib.ChangelogHandler/OmegaLeo.HelperLib.ChangelogHandler.csproj" env: @@ -34,11 +37,4 @@ jobs: git add . git commit -m "Automatically generated changelog for v${{github.event.inputs.tagName}}" git tag -a "${{ github.event.inputs.tagName }}" -m "Release ${{ github.event.inputs.tagName }}" - git push origin "${{ github.event.inputs.tagName }}" - - name: Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: '${{ github.event.inputs.tagName }}' - release_name: 'Release v${{ github.event.inputs.tagName }}' \ No newline at end of file + git push origin "${{ github.event.inputs.tagName }}" \ No newline at end of file diff --git a/.github/workflows/nuget-publish.yml b/.github/workflows/nuget-publish.yml index b81fe7f..d2bd67c 100644 --- a/.github/workflows/nuget-publish.yml +++ b/.github/workflows/nuget-publish.yml @@ -2,6 +2,7 @@ name: Publish Nuget Packages on: release: types: [created] +run-name: "Publish version v${{github.event.release.tag_name}} to nuget" jobs: get-release: name: Get Release @@ -24,7 +25,7 @@ jobs: - name: Setup .Net Core uses: actions/setup-dotnet@v1 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' - name: Update Project Version run: sed -i "s/\(\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{ github.event.release.tag_name }}/" "./OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj" - name: Create Nuget Package @@ -48,9 +49,9 @@ jobs: - name: Setup .Net Core uses: actions/setup-dotnet@v1 with: - dotnet-version: '7.0.x' + dotnet-version: '8.0.x' - name: Update Project Version - run: sed -i "s/\(\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{ github.event.release.tag_name }}/" "./OmegaLeo.HelperLib/OmegaLeo.HelperLib.Changelog.csproj" + run: sed -i "s/\(\([0-9]\+\.\)\{2\}\)\([0-9]\+\)/\1${{ github.event.release.tag_name }}/" "./OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj" - name: Create Nuget Package run: dotnet pack "./OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj" -c Release /p:Version=${{ github.event.release.tag_name }} /p:PackageReleaseNotes="See https://github.com/omegaleo/OmegaLeo.HelperLib/releases/tag/${{ github.event.release.tag_name }}" - name: Publish Nuget Package @@ -61,6 +62,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.TOKEN }} with: upload_url: ${{ needs.get-release.outputs.upload_url }} - asset_path: ./OmegaLeo.HelperLib/bin/Release/OmegaLeo.HelperLib.Changelog.${{ github.event.release.tag_name }}.nupkg + asset_path: ./OmegaLeo.HelperLib.Changelog/bin/Release/OmegaLeo.HelperLib.Changelog.${{ github.event.release.tag_name }}.nupkg asset_name: OmegaLeo.HelperLib.Changelog.${{ github.event.release.tag_name }}.nupkg asset_content_type: application/zip \ No newline at end of file diff --git a/OmegaLeo.HelperLib.Changelog/LICENSE.md b/OmegaLeo.HelperLib.Changelog/LICENSE.md new file mode 100644 index 0000000..ca8f2dd --- /dev/null +++ b/OmegaLeo.HelperLib.Changelog/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Nuno "Omega Leo" Diogo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj b/OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj index 30b770a..361560a 100644 --- a/OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj +++ b/OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj @@ -2,8 +2,20 @@ netstandard2.1 - enable + disable enable + Omega Leo's Helper Library - Changelog + Nuno "Omega Leo" Diogo + Package to help with Changelog generation + https://github.com/omegaleo/HelperLib + README.md + https://github.com/omegaleo/HelperLib + + + + + + diff --git a/OmegaLeo.HelperLib.Changelog/README.md b/OmegaLeo.HelperLib.Changelog/README.md new file mode 100644 index 0000000..082b9f4 --- /dev/null +++ b/OmegaLeo.HelperLib.Changelog/README.md @@ -0,0 +1,12 @@ +# Omega Leo's Helper Library - Changelog +Package to help with Changelog generation by providing a new Changelog attribute and a tool to extract a dictionary of the changelogs or the markdown for CHANGELOG.md + +Example attribute usage: +```cs +[Changelog("v1.0.0", "This is a test")] +[Changelog("v1.0.1", "This is another test")] +public class Test +{ + +} +``` \ No newline at end of file diff --git a/OmegaLeo.HelperLib.ChangelogHandler/OmegaLeo.HelperLib.ChangelogHandler.csproj b/OmegaLeo.HelperLib.ChangelogHandler/OmegaLeo.HelperLib.ChangelogHandler.csproj index 649c15b..e62e50e 100644 --- a/OmegaLeo.HelperLib.ChangelogHandler/OmegaLeo.HelperLib.ChangelogHandler.csproj +++ b/OmegaLeo.HelperLib.ChangelogHandler/OmegaLeo.HelperLib.ChangelogHandler.csproj @@ -3,7 +3,7 @@ Exe net8.0 - enable + disable enable diff --git a/OmegaLeo.HelperLib.ChangelogHandler/Program.cs b/OmegaLeo.HelperLib.ChangelogHandler/Program.cs index a2538a7..9c7dfa1 100644 --- a/OmegaLeo.HelperLib.ChangelogHandler/Program.cs +++ b/OmegaLeo.HelperLib.ChangelogHandler/Program.cs @@ -1,5 +1,8 @@ // See https://aka.ms/new-console-template for more information +using System; +using System.Collections.Generic; +using System.IO; using System.Reflection; using GameDevLibrary.Helpers; using OmegaLeo.HelperLib.Changelog.Models; diff --git a/OmegaLeo.HelperLib/LICENSE.md b/OmegaLeo.HelperLib/LICENSE.md new file mode 100644 index 0000000..ca8f2dd --- /dev/null +++ b/OmegaLeo.HelperLib/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Nuno "Omega Leo" Diogo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj b/OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj index cd876f5..7d53c1d 100644 --- a/OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj +++ b/OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj @@ -7,6 +7,7 @@ 0.0.2 Omega Leo's Helper Library Nuno "Omega Leo" Diogo + README.md https://github.com/omegaleo/HelperLib https://github.com/omegaleo/HelperLib @@ -15,4 +16,10 @@ + + + + + + diff --git a/OmegaLeo.HelperLib/README.md b/OmegaLeo.HelperLib/README.md new file mode 100644 index 0000000..bf8b90d --- /dev/null +++ b/OmegaLeo.HelperLib/README.md @@ -0,0 +1 @@ +# Omega Leo's Helper Lib \ No newline at end of file