Skip to content

Commit

Permalink
test: github access token
Browse files Browse the repository at this point in the history
  • Loading branch information
tintinkung committed Apr 22, 2024
1 parent 2c25713 commit 841013b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ jobs:
with:
java-version: '17'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
server-id: aseanbte-repo # 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 --batch-mode deploy -s $GITHUB_WORKSPACE/settings.xml -Dgithub.token=${{ secrets.ACCESS_TOKEN }}
run: mvn --batch-mode deploy -s $GITHUB_WORKSPACE/settings.xml -DACCESS_TOKEN=$ACCESS_TOKEN
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
2 changes: 1 addition & 1 deletion settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<id>aseanbte-repo</id>
<username>asean-build-the-earth</username>
<!-- Public token with `read:packages` scope -->
<password>${github.token}</password>
<password>${ACCESS_TOKEN}</password>
</server>
</servers>
</settings>

0 comments on commit 841013b

Please sign in to comment.