Skip to content

Commit

Permalink
feat: Automatic changelogs
Browse files Browse the repository at this point in the history
  • Loading branch information
IanTapply22 committed May 25, 2024
1 parent 3d63688 commit 1a494a0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish Changelog

on:
push:
branches: [ "main" ]

jobs:
release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.event.head_commit.message, 'feat') }}
needs: central

steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Generate changelog
id: changelog
uses: jaywcjlove/changelog-generator@v2.1.0
with:
token: ${{ github.token }}

- id: get-version
uses: jactions/maven-version@v1.2.0

- name: Create github release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ steps.get-version.outputs.version }}
release_name: ${{ steps.get-version.outputs.version }}
body: |
Grab the new version from https://github.com/IanTapply22/Wynncraft/packages/2160010 version ${{ steps.get-version.outputs.version }}
```
<dependencies>
<dependency>
<groupId>com.iantapply</groupId>
<artifactId>wynncraft</artifactId>
<version>${{ steps.get-version.outputs.version }}</version>
</dependency>
</dependencies>
```
### Changelog
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group = 'com.iantapply'
version = '1.0.1'
version = '1.0.2'

repositories {
mavenCentral()
Expand Down

0 comments on commit 1a494a0

Please sign in to comment.