Skip to content

New Release

New Release #2

name: New Release
on:
milestone:
types: [closed]
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Get Project Version
id: get_version
uses: mod-posh/[email protected]
with:
Filename: 'Logger/Logger.csproj'
verbose: "verbose"
- name: Create Release Notes
uses: mod-posh/[email protected]
with:
milestone_number: ${{ github.event.milestone.number }}
verbose: 'verbose'
github_token: ${{ secrets.PAT }}
- name: Pull Latest Changes
run: git pull origin ${{ github.ref_name }}
shell: bash
- name: Create Release
uses: mod-posh/[email protected]
with:
name: 'Release v${{ env.VERSION }}'
filename: 'RELEASE.md'
version: ${{ env.VERSION }}
verbose: 'verbose'
github_token: ${{ secrets.PAT }}
- name: Install XMLDocMD Tool
run: dotnet tool install --global xmldocmd
- name: Build Project
run: dotnet build Logger/Logger.csproj --configuration Release
- name: Publish Project for .NET 6.0
run: dotnet publish Logger/Logger.csproj --configuration Release --framework net6.0 --output ./publish/net6.0
- name: Publish Project for .NET 7.0
run: dotnet publish Logger/Logger.csproj --configuration Release --framework net7.0 --output ./publish/net7.0
- name: Generate Documentation for .NET 6.0
run: |
xmldocmd ./publish/net6.0/Logger.dll Docs --visibility private --clean --namespace ModPosh.Logger --namespace-pages
env:
PATH: ${{ github.runner.tool_cache }}/.dotnet/tools:$PATH:~/.dotnet/tools
- name: Generate Documentation for .NET 7.0
run: |
xmldocmd ./publish/net7.0/Logger.dll Docs --visibility private --clean --namespace ModPosh.Logger --namespace-pages
env:
PATH: ${{ github.runner.tool_cache }}/.dotnet/tools:$PATH:~/.dotnet/tools
- name: Run markdownlint-cli2-action
uses: DavidAnson/markdownlint-cli2-action@v16
with:
globs: '**/*.md'
fix: true
- name: Commit Documentation Changes
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git add Docs/
git commit -m "Update documentation for release v${{ env.VERSION }}"
git push origin ${{ github.ref_name }}
if: success()