Skip to content

Commit

Permalink
Fix GitHub auth for release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Awambeng committed Jan 17, 2025
1 parent 2b1c29f commit 56c4040
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions .github/workflows/maven-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,8 @@ jobs:
GIT_USER_NAME: ${{ vars.GIT_USER_NAME }}

steps:
- name: Set up Git for authentication
run: |
git config --global url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Checkout Repository
uses: actions/checkout@v4
with:
token: ${GITHUB_TOKEN}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -63,7 +57,11 @@ jobs:
distribution: 'temurin'
server-id: sonatype
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
server-password: MAVEN_PASSWORD

- name: Set up Git for authentication
run: |
git config --global url."https://${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
- name: Set up GPG for signing
run: |
Expand All @@ -79,8 +77,4 @@ jobs:
- name: Build, sign, and release
run: mvn clean release:prepare release:perform -Dgpg.passphrase="$GPG_PASSPHRASE"
env:
GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GIT_USER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_USER_NAME: ${{ vars.GIT_USER_NAME }}
GITHUB_TOKEN: ${GITHUB_TOKEN}

0 comments on commit 56c4040

Please sign in to comment.