Skip to content

Commit

Permalink
build: set custom credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
ali-ince committed Sep 26, 2023
1 parent 1835108 commit 327d3e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
server-id: github
server-username: PACKAGES_USERNAME
server-password: ${{ secrets.PACKAGES_PASSWORD }}
- name: Build with Maven
run: mvn -B verify --file pom.xml -s $GITHUB_WORKSPACE/settings.xml
run: mvn -B verify
12 changes: 5 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v3
Expand All @@ -18,13 +17,12 @@ jobs:
with:
java-version: '11'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file

server-id: github
server-username: PACKAGES_USERNAME
server-password: ${{ secrets.PACKAGES_PASSWORD }}
- name: Build with Maven
run: mvn -B package --file pom.xml

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

0 comments on commit 327d3e6

Please sign in to comment.