Skip to content

Commit

Permalink
DEVOPS: add github package deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
stijn-dejongh committed Sep 21, 2024
1 parent 14a930f commit 16b69da
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_mainline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ on:
push:
branches:
- main
- main_**

jobs:
build:
Expand All @@ -15,9 +14,10 @@ jobs:

steps:
- uses: actions/checkout@v4
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} # Needed to get PR information, if any
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.REPO_TOKEN }}

- name: Set up JDK 21
uses: actions/setup-java@v4
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/release.yml
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@v4
- uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 16b69da

Please sign in to comment.