Skip to content

Commit

Permalink
Set up deployment to GitHub packages
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtleException committed May 21, 2024
1 parent de0c2a3 commit 56e89a9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 6 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish package to GitHub Packages

on:
release:
types:
- created
workflow_dispatch:


jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Publish package
run: mvn -B deploy --file pom.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 3 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,10 @@
</scm>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/TurtleException/FancyFormat</url>
</repository>
</distributionManagement>

Expand Down

0 comments on commit 56e89a9

Please sign in to comment.