-
Notifications
You must be signed in to change notification settings - Fork 37
47 lines (43 loc) · 1.65 KB
/
publish.yml
File metadata and controls
47 lines (43 loc) · 1.65 KB
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
# A workflow for publishing the plugin to the Gradle Plugin Portal
#
# Release Process:
# 1. Update the version number in root build.gradle to the next non-SNAPSHOT version.
# e.g. replace `version '1.2.3-SNAPSHOT' with '1.2.3'
# 2. Replace all references to the last release number with the new release number.
# e.g. search for `1.2.2` and replace with `1.2.3`.
# 3. Commit changes in PR and merge.
# 4. Run this workflow to publish the plugin.
# 5. Update the version number in root build.gradle to the next -SNAPSHOT version.
## e.g. replace `version '1.2.3' with '1.2.4-SNAPSHOT'
name: Publish to the Gradle Plugin Portal
on: [workflow_dispatch]
jobs:
publish:
runs-on: ubuntu-latest
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
steps:
- name: Git checkout
uses: actions/checkout@v6.0.1
- name: Set up JDK 17
uses: actions/setup-java@v5
with:
cache: gradle
distribution: microsoft
java-version: 17
- name: Create gradle.properties
run: echo -e "gradle.publish.key=$GRADLE_PUBLISH_KEY\ngradle.publish.secret=$GRADLE_PUBLISH_SECRET" > gradle.properties
- name: Build with Gradle
run: ./gradlew build -x test publishPlugins
create-gh-release:
needs: [publish]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v3.0.0
- name: Create GitHut Release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v0.1.15
with:
generate_release_notes: true