Skip to content

Commit

Permalink
chore: fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
philasmar committed Mar 2, 2024
1 parent 90bc4e9 commit e0d57a4
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions .github/workflows/start-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
Expand Down Expand Up @@ -43,6 +45,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: '0'
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
Expand All @@ -53,22 +56,31 @@ jobs:
run: dotnet pack
- name: Install AutoVer
run: dotnet tool install -g --add-source src/AutoVer/bin/Release autover
- name: Read Changelog Details
id: read-changelog-details
- name: Setup Git User
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub User"
- name: Read Release Name
id: read-release-name
run: |
version=$(autover changelog --release-name)
changelog=$(autover changelog --output-to-console)
echo "VERSION=$version" >> $GITHUB_OUTPUT
echo "CHANGELOG=$changelog" >> $GITHUB_OUTPUT
- name: Read Changelog
id: read-changelog
run: |
changelog=$(autover changelog --output-to-console)
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
echo $changelog >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.read-changelog-details.outputs.VERSION }}
body: ${{ steps.read-changelog-details.outputs.CHANGELOG }}
release_name: ${{ steps.read-release-name.outputs.VERSION }}
body: ${{ steps.read-changelog.outputs.CHANGELOG }}
draft: false
prerelease: false
- name: Push to GitHub Registry
Expand Down

0 comments on commit e0d57a4

Please sign in to comment.