Merge pull request #1 from DamirDenis-Tudor/features #31
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: Deployment | ||
on: | ||
release: | ||
types: | ||
- published | ||
#jobs: | ||
# deploy: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout sources | ||
# uses: actions/checkout@v4 | ||
# | ||
# - name: Setup Gradle | ||
# uses: gradle/actions/setup-gradle@v3 | ||
# | ||
# - name: Upload in Maven | ||
# run: | | ||
# ./gradlew uploadArtifact \ | ||
# -PreleaseVersion="${{ github.event.release.tag_name }}" \ | ||
# -Psigning.keyId="${{ secrets.SIGNING_KEY_ID }}" \ | ||
# -Psigning.password="${{ secrets.SIGNING_PASSWORD }}" \ | ||
# -Psigning.secretKeyRingFile="${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}" \ | ||
# -PtokenBase64="${{ secrets.TOKEN_BASE64 }}" | ||
update-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Update release description | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const newDescription = "[Maven Repository](https://central.sonatype.com/artifact/io.github.damirdenis-tudor/${{ github.event.repository.name }}/${{ github.event.release.tag_name }})" | ||
await octokit.rest.repos.updateRelease({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
release_id: ${{ github.event.release.id }}, | ||
description: `${github.event.release.body}\n${newDescription}` # Append to existing description | ||
}); |