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 4a10e0e commit 0975e5b
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,16 @@ 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 \
-DpomFile=pom.xml \
-DgroupId=com.github.${{ github.repository_owner }} \
-DartifactId=ShellApiLogOptimizer \
-Dversion=0.0.1-SNAPSHOT \
-Dpackaging=jar \
-Dfile=target/ShellApiLogOptimizer-0.0.1-SNAPSHOT.jar \
-DrepositoryId=github \
-Durl=https://maven.pkg.github.com/${{ github.repository }} \
-DgeneratePom=false
-DgeneratePom=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

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

0 comments on commit 0975e5b

Please sign in to comment.