Skip to content

Commit

Permalink
extracted maven publish to own workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
NonSwag committed May 1, 2024
1 parent d9584bd commit 51f80d9
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 4 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/hangar-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Hangar Publish

on:
release:
types:
- prereleased
- released

jobs:
build:
env:
HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Publish with Gradle to Hangar
uses: gradle/actions/setup-gradle@v3
with:
arguments: publishAllPublicationsToHangar
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Hangar Publish
name: Maven Publish

on:
release:
Expand All @@ -9,7 +9,6 @@ on:
jobs:
build:
env:
HANGAR_API_TOKEN: ${{ secrets.HANGAR_API_TOKEN }}
REPOSITORY_USER: ${{ secrets.REPOSITORY_USER }}
REPOSITORY_TOKEN: ${{ secrets.REPOSITORY_TOKEN }}
runs-on: ubuntu-latest
Expand All @@ -20,7 +19,7 @@ jobs:
with:
java-version: '21'
distribution: 'temurin'
- name: Publish with Gradle to Hangar and Repository
- name: Publish with Gradle to Repository
uses: gradle/actions/setup-gradle@v3
with:
arguments: publish publishAllPublicationsToHangar
arguments: publish

0 comments on commit 51f80d9

Please sign in to comment.