Skip to content

Commit

Permalink
Update maven-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
akl7777777 authored Aug 16, 2024
1 parent 0a1e9de commit 4a10e0e
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,21 @@ jobs:
- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Prepare POM for GitHub Packages
run: |
cp pom.xml pom.xml.orig
sed -i 's/<groupId>ltd.shellapi.plugin<\/groupId>/<groupId>com.github.${{ github.repository_owner }}.shellapi.plugin<\/groupId>/' pom.xml
- name: Publish to GitHub Packages
run: |
mvn deploy:deploy-file \
-DgroupId=ltd.shellapi \
-DartifactId=ShellApiLogOptimizer \
-Dversion=0.0.1-SNAPSHOT \
-Dpackaging=jar \
-DpomFile=pom.xml \
-Dfile=target/ShellApiLogOptimizer-0.0.1-SNAPSHOT.jar \
-DrepositoryId=github \
-Durl=https://maven.pkg.github.com/${{ github.repository }} \
-DpomFile=pom.xml \
-DgeneratePom=false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Restore original POM
run: mv pom.xml.orig pom.xml

0 comments on commit 4a10e0e

Please sign in to comment.