Skip to content

Commit 8726d7b

Browse files
committed
fix
1 parent 293d86f commit 8726d7b

File tree

1 file changed

+11
-25
lines changed

1 file changed

+11
-25
lines changed

.github/workflows/maven-publish.yml

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,20 @@
1-
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
2-
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path
3-
4-
name: Maven Package
5-
1+
name: Publish package to GitHub Packages
62
on:
73
release:
84
types: [created]
9-
105
jobs:
11-
build:
12-
6+
publish:
137
runs-on: ubuntu-latest
148
permissions:
159
contents: read
1610
packages: write
17-
1811
steps:
19-
- uses: actions/checkout@v4
20-
- name: Set up JDK 21
21-
uses: actions/setup-java@v4
22-
with:
23-
java-version: '21'
24-
distribution: 'temurin'
25-
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
26-
settings-path: ${{ github.workspace }} # location for the settings.xml file
27-
28-
- name: Build with Maven
29-
run: mvn -B package --file pom.xml
30-
31-
- name: Publish to GitHub Packages Apache Maven
32-
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-java@v4
14+
with:
15+
java-version: '21'
16+
distribution: 'temurin'
17+
- name: Publish package
18+
run: mvn --batch-mode deploy
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUBTOKEN }}

0 commit comments

Comments
 (0)