Skip to content

Commit

Permalink
Fix release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shitikanth committed Sep 24, 2024
1 parent 0ecc6d4 commit c946cd9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
42 changes: 24 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,29 @@ permissions:
contents: write

jobs:
build:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: 'central'
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Perform Release
run: ./mvnw -B -Prelease -Dgpg.signer=bc release:prepare release:perform
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: 'central'
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Set Git User Identity
run: |
git config --local user.email shitikanth1@gmail.com
git config --local user.name "Shitikanth Kashyap"
- name: Perform Release
run: ./mvnw -B -Prelease release:prepare release:perform -Dgpg.signer=bc
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 4 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<scm>
<connection>scm:git:https://github.com/shitikanth/enforcer-rules.git</connection>
<developerConnection>scm:git:ssh://git@github.com/shitikanth/enforcer-rules.git</developerConnection>
<developerConnection>scm:git:https://github.com/shitikanth/enforcer-rules.git</developerConnection>
<tag>HEAD</tag>
<url>https://github.com/shitikanth/enforcer-rules/tree/main</url>
</scm>
Expand Down Expand Up @@ -287,6 +287,9 @@
<goals>
<goal>sign</goal>
</goals>
<configuration>
<signer>bc</signer>
</configuration>
</execution>
</executions>
</plugin>
Expand Down

0 comments on commit c946cd9

Please sign in to comment.