Skip to content

Commit

Permalink
ci: improve release action
Browse files Browse the repository at this point in the history
  • Loading branch information
derklaro committed Mar 1, 2023
1 parent 33efd86 commit f96e7ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/draft_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@ jobs:
- name: Compile
run: ./gradlew build --no-daemon --stacktrace

- name: Resolve latest short commit SHA
run: echo "SHORT_COMMIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV;
- name: Resolve project version
run: echo "VERSION=$(./gradlew properties | awk '/^version:/ { print $2; }')+b${{ github.run_number }}" >> $GITHUB_ENV;

- name: Generate changelog
id: changelog_generate
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commitMode: true
ignorePreReleases: true
configurationJson: '{"tag_resolver":{"method":"sort"}}'
toTag: ${{ github.sha }}
configurationJson: '{"max_tags_to_fetch":5,"categories":[],"template":"#{{UNCATEGORIZED}}","pr_template":"- #{{TITLE}} (##{{NUMBER}} by #{{AUTHOR}})"}'

- name: Create Release
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
tag_name: ${{ env.SHORT_COMMIT_SHA }}
tag_name: ${{ env.VERSION }}
body: ${{steps.changelog_generate.outputs.changelog}}
fail_on_unmatched_files: true
files: |
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "io.easybill"
version = "1.0-SNAPSHOT"
version = "1.0.0-SNAPSHOT"

repositories {
mavenCentral()
Expand Down

0 comments on commit f96e7ee

Please sign in to comment.