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 1efecb6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_mainline.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Build [mainline]
name: Build [mainline]
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 1efecb6

Please sign in to comment.