-
Notifications
You must be signed in to change notification settings - Fork 5
34 lines (29 loc) · 1 KB
/
publish-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
name: Publish SNAPSHOT
on:
push:
branches:
- main
jobs:
publish-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set JDK version
uses: actions/setup-java@v2
with:
distribution: zulu
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Publish artifact
env:
ORG_GRADLE_PROJECT_mavenCentralUsername : ${{ secrets.SONATYPE_NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
# The GITHUB_REF tag comes in the format 'refs/tags/xxx'.
# If we split on '/' and take the 3rd value,
# we can get the release name.
run: |
echo "New version: $(grep "VERSION_NAME" gradle.properties | cut -d'=' -f2)"
echo "Github username: ${GITHUB_ACTOR}"
./gradlew clean -x test -x lint publish :whetstone-gradle-plugin:publish