1.0.6 release #30
Workflow file for this run
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: release | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '11' | |
- name: Set tag version in an environment variable (remove the first character) | |
run: | | |
echo "NEW_VERSION_CODE=$(echo ${GITHUB_REF/refs\/tags\//} | cut -c 2-)" >> $GITHUB_ENV | |
echo "NEW_VERSION_NAME=$(echo ${GITHUB_REF/refs\/tags\//})" >> $GITHUB_ENV | |
- name: Build and publish core in local Maven repository | |
run: ./gradlew publishToMavenLocal -PskipSigning | |
working-directory: ./poetimizely-core | |
- name: Build and publish core in Sonatype Nexus | |
run: ./gradlew publishReleasePublicationToSonatypeRepository --max-workers 1 closeAndReleaseSonatypeStagingRepository | |
working-directory: ./poetimizely-core | |
env: | |
ORG_GRADLE_PROJECT_sonatypeStagingProfileId: ${{ secrets.SONATYPE_NEXUS_STAGING_PROFILE_ID }} | |
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.SIGN_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingSecretKey: ${{ secrets.SIGN_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGN_KEY_PASS }} | |
- name: Build and publish the Maven plugin in Sonatype Nexus | |
run: ./mvnw deploy --settings=settings.xml | |
working-directory: ./poetimizely-maven-plugin | |
env: | |
SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }} | |
SONATYPE_NEXUS_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_NEXUS_STAGING_PROFILE_ID }} | |
SONATYPE_NEXUS_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }} | |
SIGN_KEY_ID: ${{ secrets.SIGN_KEY_ID_FULL }} | |
SIGN_KEY: ${{ secrets.SIGN_KEY }} | |
SIGN_KEY_PASS: ${{ secrets.SIGN_KEY_PASS }} | |
- name: Build and publish the Gradle plugin in Gradle Plugin Portal | |
run: ./gradlew publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} | |
working-directory: ./poetimizely-gradle-plugin | |
- name: Create GitHub release | |
uses: actions/create-release@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.NEW_VERSION_NAME }} | |
release_name: ${{ env.NEW_VERSION_NAME }} | |
body: | | |
https://plugins.gradle.org/plugin/io.github.patxibocos.poetimizely/${{ env.NEW_VERSION_CODE }} | |
https://central.sonatype.com/artifact/io.github.patxibocos/poetimizely-core/${{ env.NEW_VERSION_CODE }} | |
https://central.sonatype.com/artifact/io.github.patxibocos/poetimizely-maven-plugin/${{ env.NEW_VERSION_CODE }} |