Skip to content

Commit

Permalink
1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
DamirDenis-Tudor committed Jan 3, 2025
1 parent d972cb8 commit 8e43a71
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
branches:
- main
title: ^(\d+)\.(\d+)\.(\d+)$
push:
branches:
- main
commit_message: '^(\d+)\.(\d+)\.(\d+)$'

jobs:
deploy:
Expand All @@ -15,21 +19,31 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v4

- name: Set version from pull request or commit message
id: set_version
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
VERSION="${{ github.event.pull_request.title }}"
elif [[ "${{ github.event_name }}" == "push" ]]; then
VERSION="${{ github.event.head_commit.message }}"
fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Prepare for publish
run: |
./gradlew publish \
-PreleaseVersion="${{ github.event.release.tag_name }}" \
-PreleaseVersion="${{ env.VERSION }}" \
-Psigning.keyId="${{ secrets.SIGNING_KEY_ID }}" \
-Psigning.password="${{ secrets.SIGNING_PASSWORD }}" \
-Psigning.secretKeyRingFile="${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}"
- name: Release in Maven Central
run: |
./gradlew jreleaserRelease \
-PreleaseVersion="${{ github.event.release.tag_name }}" \
-PreleaseVersion="${{ env.VERSION }}" \
-PmavenCentralUsername="${{ secrets.MAVEN_CENTRAL_USERNAME }}" \
-PmavenCentralPasswordToken="${{ secrets.MAVEN_CENTRAL_PASSWORD_TOKEN }}" \
-PgithubToken="${{ secrets.GITHUB_TOKEN }}"
Expand All @@ -52,7 +66,7 @@ jobs:
- name: Commit & Push changes
uses: actions-js/push@master
with:
message: "[Maven Central Repository](https://central.sonatype.com/artifact/io.github.damirdenis-tudor/ktor-server-rabbitmq/${{ github.event.release.tag_name }})"
message: "Update README with success deployment badge"
branch: "main"
github_token: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit 8e43a71

Please sign in to comment.