Update sonatype credentials. #61
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: 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_ACTOR_USERNAME }} | |
ORG_GRADLE_PROJECT_mavenCentralPassword : ${{ secrets.SONATYPE_NEXUS_ACTOR_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 |