Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40f408ea06 |
43
.github/workflows/release-build.yml
vendored
Normal file
43
.github/workflows/release-build.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Build Release
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Generate Release Notes"]
|
||||
types: [completed]
|
||||
|
||||
env:
|
||||
BUILD_FILES: "chancery/build/libs/*.jar"
|
||||
JDK_VERSION: "21"
|
||||
GRADLE_TASK: "build shadowJar --refresh-dependencies"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK ${{ env.JDK_VERSION }}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: ${{ env.JDK_VERSION }}
|
||||
|
||||
- name: Setup Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Make gradlew executable
|
||||
run: chmod +x ./gradlew
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew ${{ env.GRADLE_TASK }}
|
||||
|
||||
- name: Update Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: ${{ env.BUILD_FILES }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
40
.github/workflows/release-notes.yml
vendored
Normal file
40
.github/workflows/release-notes.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Generate Release Notes
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
PROJECT_NAME: ${{ github.event.repository.name }}
|
||||
RELEASE_TAG: ${{ github.ref_name }}
|
||||
RELEASE_BODY: ${{ github.event.release.body }}
|
||||
COMMIT_URL: commit
|
||||
|
||||
jobs:
|
||||
generate-changelog:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Generate Changelog
|
||||
uses: AXOLOTsh/action-generate-changelog@v1
|
||||
id: generate_changelog
|
||||
with:
|
||||
release_tag: ${{ env.RELEASE_TAG }}
|
||||
release_body: ${{ env.RELEASE_BODY }}
|
||||
commit_url: ${{ env.COMMIT_URL }}
|
||||
|
||||
- name: Update Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ env.RELEASE_TAG }}
|
||||
name: ${{ env.PROJECT_NAME }} ${{ env.RELEASE_TAG }}
|
||||
body_path: ${{ steps.generate_changelog.outputs.changelog_path }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user