Updated changelog workflow

This commit is contained in:
2026-01-28 13:27:25 +00:00
parent 4e131d158c
commit 73a7983b7e
+23 -12
View File
@@ -12,29 +12,40 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v4
with: with:
ref: ${{ github.head_ref }} ref: ${{ github.ref }}
token: ${{ secrets.TOKEN }} token: ${{ secrets.TOKEN }}
fetch-depth: 0
- name: Setup .NET - name: Setup .NET
uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v4
with: with:
dotnet-version: '9.0.x' dotnet-version: '9.0.x'
- name: Update Project Versions
- name: Update OmegaLeo.HelperLib Version
run: sed -i "s/\(<Version>\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj" run: sed -i "s/\(<Version>\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib/OmegaLeo.HelperLib.csproj"
- name: Update Project Versions - name: Update OmegaLeo.HelperLib.Changelog Version
run: sed -i "s/\(<Version>\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj" run: sed -i "s/\(<Version>\)[0-9]\+\.[0-9]\+\.[0-9]\+/\1${{github.event.inputs.tagName}}/" "./OmegaLeo.HelperLib.Changelog/OmegaLeo.HelperLib.Changelog.csproj"
- name: Build and Run Changelog Generator - name: Build Solution
run: dotnet run --project "./OmegaLeo.HelperLib.ChangelogHandler/OmegaLeo.HelperLib.ChangelogHandler.csproj" run: dotnet build --configuration Release
- name: Run Changelog Generator
run: dotnet run --project "./OmegaLeo.HelperLib.ChangelogHandler/OmegaLeo.HelperLib.ChangelogHandler.csproj" --configuration Release
env: env:
UNITYFLOW_SECRET: ${{ secrets.TOKEN }} TAG_VERSION: ${{ github.event.inputs.tagName }}
- name: Create Tag
- name: Commit and Push Changes
run: | run: |
git config --local user.email "nunodiogo@omegaleo.pt" git config --local user.email "nunodiogo@omegaleo.pt"
git config --local user.name "Nuno Diogo" git config --local user.name "Nuno Diogo"
git add . git add .
git commit -m "Automatically generated changelog for v${{github.event.inputs.tagName}}" git diff --staged --quiet || git commit -m "chore: update changelog and version to v${{github.event.inputs.tagName}}"
git tag -a "${{ github.event.inputs.tagName }}" -m "Release ${{ github.event.inputs.tagName }}" git push origin ${{ github.ref }}
git push origin "${{ github.event.inputs.tagName }}"
- name: Create and Push Tag
run: |
git tag -a "v${{ github.event.inputs.tagName }}" -m "Release v${{ github.event.inputs.tagName }}"
git push origin "v${{ github.event.inputs.tagName }}"