Skip to content

Commit

Permalink
Change release action
Browse files Browse the repository at this point in the history
  • Loading branch information
the3venthoriz0n committed Mar 21, 2024
1 parent 9d9a290 commit 2296c82
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,11 @@ jobs:
- name: Validate artifact exists
run: test -d ./dist

- name: Run script to extract changelog entry
id: extract-changelog
run: |
# Read the contents of the changelog.md file
changelog_content=$(<CHANGELOG.md)
# Extract the changelog entry corresponding to the release tag
changelog_entry=$(echo "$changelog_content" | sed -n "/## \[${{ github.ref }}\]/,/^## /p" | sed '$d')
# Store the changelog entry in an output variable
echo "::set-output name=changelog::${changelog_entry}"
continue-on-error: true

- name: Create or update release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body: ${{ steps.extract-changelog.outputs.changelog }}
draft: false
prerelease: false
files: ./dist/*.zip

- name: Publish to Thunderstore
env:
Expand Down

0 comments on commit 2296c82

Please sign in to comment.