Skip to content

Commit

Permalink
feat: Added workflow to deploy SNAPSHOT versions into Maven Central
Browse files Browse the repository at this point in the history
  • Loading branch information
borislavr authored Mar 4, 2025
1 parent 5d3dc64 commit 33e1670
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 69 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/maven-central-snapshot-deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# The workflow to deploy snapshot artifact versions to Maven Central
# Fill free to adjust java version and additional mvn command-line parameters
# The workflow will trigger on pushes into branches different from main and release
# Please make sure that the version in the pom.xml file has the SNAPSHOT postfix

# Please adjust pom.xml file for your project according to the instructions:
# https://github.com/Netcracker/qubership-workflow-hub/blob/main/docs/maven-publish-pom-preparation_doc.md

name: Maven Central deploy snapshot

on:
push:
branches-ignore:
- "main"
- "**release*"
- "prettier/**"
workflow_dispatch:

jobs:
mvn-snapshot-deploy:
uses: netcracker/qubership-workflow-hub/.github/workflows/maven-central-snapshot-deploy-reusable.yaml@main
with:
java-version: "21"
additional-mvn-args: ""
secrets:
maven-username: ${{ secrets.MAVEN_USER }}
maven-token: ${{ secrets.MAVEN_PASSWORD }}
gpg-passphrase: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
68 changes: 0 additions & 68 deletions .github/workflows/maven-snapshot-github-deploy.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.6.0</version>
<version>0.7.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
Expand Down

0 comments on commit 33e1670

Please sign in to comment.