name: Publish Release on: workflow_dispatch: inputs: version: description: 'Version to release' required: true after-version: description: 'Snapshot version after release' required: true jobs: set-release-version: uses: ./.github/workflows/set-version.yml with: version: ${{ inputs.version }} build: needs: set-release-version runs-on: ubuntu-latest permissions: contents: write steps: - name: Checkout repository uses: actions/checkout@v6 with: ref: ${{ github.ref }} - name: Set up Gradle uses: gradle/actions/setup-gradle@v5 - name: Set up JDK 21 uses: actions/setup-java@v5 with: java-version: '21' distribution: 'temurin' - name: Build with Gradle run: ./gradlew chiseledBuild - name: Build Changelog id: changelog uses: mikepenz/release-changelog-builder-action@v6 with: mode: COMMIT toTag: ${{ github.ref }} configurationJson: | { "template": "#{{CHANGELOG}}", "commit_template": "- [`#{{SHORT_MERGE_SHA}}`](https://github.com/#{{OWNER}}/#{{REPO}}/commit/#{{MERGE_SHA}}) #{{TITLE}}", "categories": [ { "title": "## Features", "labels": ["feat", "feature"] }, { "title": "## Fixes", "labels": ["fix", "bug"] }, { "title": "## Performance", "labels": ["perf"] }, { "title": "## Refactor", "labels": ["refactor"] }, { "title": "## Documentation", "labels": ["docs"] }, { "title": "## Build", "labels": ["build", "chore", "ci"] }, { "title": "## Other", "labels": [] } ], "empty_template": "no changes", "label_extractor": [ { "pattern": "^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\\([\\w\\-\\.]+\\))?(!)?: ([\\w ])+([\\s\\S]*)", "on_property": "title", "target": "$1" } ], "custom_placeholders": [ { "name": "SHORT_MERGE_SHA", "source": "MERGE_SHA", "transformer": { "pattern": "^([0-9a-f]{7})[0-9a-f]*$", "target": "$1" } } ] } env: GITHUB_TOKEN: ${{ github.token }} - name: Create GitHub Release env: GH_TOKEN: ${{ github.token }} CHANGELOG: ${{ steps.changelog.outputs.changelog }} run: | VERSION="${{ inputs.version }}" REPO="${{ github.repository }}" DOWNLOAD_URL="https://github.com/${REPO}/releases/download/${VERSION}" NOTES=$(cat <