Skip to content

Commit

Permalink
fix(ci): update deploy to github packages config
Browse files Browse the repository at this point in the history
  • Loading branch information
juliengalet committed Apr 22, 2021
1 parent 964d1b6 commit 487b302
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/maven-github-packages-deploy.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
name: Java GitHub CD with Maven

on:
release:
types: [ created ]
types: [created]
jobs:
publish:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
server-id: github
- name: Publish package
run: mvn --batch-mode deploy
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Publish to GitHub Packages Apache Maven
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}

0 comments on commit 487b302

Please sign in to comment.