Skip to content

Prepare next development version. #55

Prepare next development version.

Prepare next development version. #55

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