Merge pull request #123 from outfoxx/fix/sunday-ann-targets #36
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: Publish Release | |
on: | |
push: | |
tags: [ "[0-9]+.[0-9]+.[0-9]+**" ] | |
permissions: | |
contents: write | |
concurrency: | |
group: publish-release-${{github.ref_name}} | |
cancel-in-progress: false | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: temurin | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Git Short SHA | |
run: | | |
calculatedSha=$(git rev-parse --short ${{ github.sha }}) | |
echo "GIT_COMMIT_SHA=$calculatedSha" >> $GITHUB_ENV | |
- name: Build Artifacts & Documentation | |
run: >- | |
./gradlew | |
-PreleaseVersion=${{ github.ref_name }} | |
build dokkaHtmlMultiModule | |
-x test | |
env: | |
GIT_COMMIT_SHA: ${{ env.GIT_COMMIT_SHORT_SHA }} | |
- name: Publish Maven Release | |
run: >- | |
./gradlew | |
-PreleaseVersion=${{ github.ref_name }} | |
-PsonatypeUsername=${{ secrets.OSSRH_TOKEN_USER }} -PsonatypePassword=${{ secrets.OSSRH_TOKEN_PASS }} | |
:generator:publishToSonatype | |
:cli:publishToSonatype | |
closeAndReleaseSonatypeStagingRepository | |
-x test | |
env: | |
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |
- name: Publish Plugin Release | |
run: >- | |
./gradlew | |
-PreleaseVersion=${{ github.ref_name }} | |
-Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }} | |
publishPlugins -x test | |
env: | |
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} | |
- name: Publish Docker | |
run: >- | |
./gradlew | |
-PreleaseVersion=${{ github.ref_name }} | |
--continue | |
-Djib.to.auth.username=${{ secrets.DOCKER_PUBLISH_USER }} | |
-Djib.to.auth.password=${{ secrets.DOCKER_PUBLISH_TOKEN }} | |
build | |
jib | |
-x test | |
- name: Publish Documentation | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages | |
clean: false | |
folder: build/dokka | |
- name: Publish GitHub Release | |
run: >- | |
./gradlew | |
-PreleaseVersion=${{ github.ref_name }} | |
-Pgithub.token=${{ secrets.GITHUB_TOKEN }} | |
githubRelease | |
-x test | |
env: | |
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.OSSRH_GPG_SECRET_KEY_ID }} | |
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }} | |
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} |