-
-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (41 loc) · 1.42 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_API_KEY }}
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