Skip to content

Commit

Permalink
build: add Bearer config
Browse files Browse the repository at this point in the history
  • Loading branch information
xamde committed Oct 30, 2023
1 parent 4772fcb commit cf5dd6c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p ~/.m2
echo "<settings><servers><server><id>gh</id><username>$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}')</username><password>\${env.GITHUB_TOKEN}</password></server></servers></settings>" > ~/.m2/settings.xml
echo "<settings><servers> \
<server><id>github</id> \
<username>$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}')</username> \
<password>\${env.GITHUB_TOKEN}</password> \
<configuration> \
<httpHeaders \>
<property> \
<name>Authorization</name> \
<value>Bearer ${env.GITHUB_TOKEN}</value> \
</property> \
</httpHeaders> \
</configuration> \
</server></servers></settings>" > ~/.m2/settings.xml
REPO="gh::default::https://maven.pkg.github.com/${GITHUB_REPOSITORY}"
mvn deploy -DaltReleaseDeploymentRepository="${REPO}" -DaltSnapshotDeploymentRepository="${REPO}"

0 comments on commit cf5dd6c

Please sign in to comment.