Skip to content

Commit

Permalink
build: create workflow to publish to Maven packages once a release is…
Browse files Browse the repository at this point in the history
… created
  • Loading branch information
Jonathan Poston committed Jul 20, 2022
1 parent cfd3110 commit a1e350b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish package to GitHub Packages
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '1.8'
distribution: 'adopt'
- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@
<url>https://github.com/jfposton/yt-dlp-java</url>
</scm>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/jfposton/yt-dlp-java</url>
</repository>
</distributionManagement>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jackson.version>2.13.3</jackson.version>
Expand Down

0 comments on commit a1e350b

Please sign in to comment.