Release 2.1.1 #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "New version (and git tag)" | |
required: true | |
run-name: "Release ${{ inputs.version }}" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
- name: Set up Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
- name: Publish plugin to Gradle Portal | |
env: | |
ORG_GRADLE_PROJECT_gradle.publish.key: ${{ secrets.GRADLE_API_KEY }} | |
ORG_GRADLE_PROJECT_gradle.publish.secret: ${{ secrets.GRADLE_API_SECRET }} | |
run: ./gradlew check generateChangelog publishPlugins -Pversion=${{ inputs.version }} | |
- name: Commit and Push Change Log | |
id: changelog-commit | |
run: | | |
git config user.name '${{ github.actor }}' | |
git config user.email '${{ github.actor }}@users.noreply.github.com' | |
git add CHANGELOG.md | |
git commit -m "Version ${{ inputs.version }}" | |
git push | |
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT | |
- name: Create release and tag | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ inputs.version }} | |
target_commitish: ${{ steps.changelog-commit.outputs.sha }} | |
body_path: build/reports/changelog/latest-release-body.md |