Skip to content

clean: Commented and remove unneeded CI refrences #55

clean: Commented and remove unneeded CI refrences

clean: Commented and remove unneeded CI refrences #55

Workflow file for this run

name: Publish Changelog
# Triggered on pushes to main
on:
push:
branches: [ "main" ]
# Jobs are only triggered when the commit message starts with 'feat'
jobs:
# Fetches the Gradle version from build.gradle
version:
name: Fetch Gradle Version
if: ${{ startsWith(github.event.head_commit.message, 'feat') }}
runs-on: ubuntu-latest
# This job outputs the Gradle version
outputs:
version: ${{ steps.version.outputs.version }}
# Fetch and output the Gradle version
steps:
- uses: actions/checkout@v2
- uses: thecodemonkey/action-get-gradle-version@master
id: version
- run: 'echo version ${{ steps.version.outputs.version }}'
# Creates a new GitHub release containing the changelog and dependency information
release:
name: Create GitHub Release
if: ${{ startsWith(github.event.head_commit.message, 'feat') }}
runs-on: ubuntu-latest
needs: version # This job depends on the version job
steps:
- uses: actions/checkout@v4
# Gets the previous tag and stores it in the environment
- run: echo "previous_tag=$(git describe --tags --abbrev=0 2>/dev/null || echo '')" >> $GITHUB_ENV
# Generate the changelog content (commit messages) between the previous tag and the current commit
- name: Generate changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
# Outputs the changelog content
- name: Get the changelog
run: echo "${{ steps.changelog.outputs.changelog }}"
# Create a new GitHub release with the changelog content and the dependency information
- name: Create github release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{needs.version.outputs.version}}
release_name: ${{needs.version.outputs.version}}
body: |
Grab the new version from https://github.com/IanTapply22/Wynncraft/packages/2160010 version ${{needs.version.outputs.version}}
```
<dependencies>
<dependency>
<groupId>com.iantapply</groupId>
<artifactId>wynncraft</artifactId>
<version>${{needs.version.outputs.version}}</version>
</dependency>
</dependencies>
```
### Changelog
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false