Skip to content

Commit

Permalink
Update build pipeline to generate release notes. (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
Epicguru authored Aug 26, 2024
1 parent 7b826fd commit 4922706
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/GenerateReleaseZip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ jobs:
- name: Zip Mod
run: |
cd $HOME
sudo apt install zip
zip -r ./${{ env.MOD_NAME }}.zip ./${{ env.MOD_NAME }}/*
- name: Upload Mod Zip Artifact
Expand All @@ -110,23 +111,30 @@ jobs:
needs: package
runs-on: ubuntu-latest
steps:

# This extracts the tag name (from github.ref) and uses it as a version
- name: Get the Version
id: get_version
# This is a special syntax for GitHub Actions that sets an output
# variable. See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: echo "VERSION=$(echo ${{ github.ref }} | cut -d / -f 3)" >> $GITHUB_OUTPUT

# Set the release name to the mod name and the version from the step above.
- name: Set Environment Variables
# This is a special syntax for GitHub Actions that sets an environment
# variable. See: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
run: echo "MOD_RELEASE=$MOD_NAME-${{ steps.get_version.outputs.VERSION }}" >> $GITHUB_ENV

# Download the build artifact from the package job.
- name: Download Mod Artifacts from Build Step
id: download_zip
uses: actions/[email protected]
with:
name: ${{ env.MOD_NAME }}

# Auto-generate changelog.
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v5
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}

- name: Create Release
id: create_release
uses: actions/[email protected]
Expand All @@ -135,6 +143,7 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: ${{ env.MOD_RELEASE }}
body: ${{ steps.github_release.outputs.changelog }}
# These can be configured at the top of the workflow.
draft: ${{ env.RELEASE_DRAFT }}
prerelease: ${{ env.RELEASE_PRERELEASE }}
Expand Down

0 comments on commit 4922706

Please sign in to comment.