Skip to content

Commit

Permalink
Create release steps to publish to Maven Central
Browse files Browse the repository at this point in the history
  • Loading branch information
Dario Mauri committed May 6, 2024
1 parent ce6fddd commit a9239e1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,30 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
- name: Set up JDK 17 to publish to GitHub Packages
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: 'maven'
server-id: github
settings-path: ${{ github.workspace }}

- name: Publish to GitHub Packages
run: mvn --batch-mode -s $GITHUB_WORKSPACE/settings.xml deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up JDK 17 to publish to Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
cache: 'maven'
server-id: central
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish to Maven Central Repository
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>io.github.dario-mr</groupId>
<artifactId>time-it</artifactId>
<version>1.0.0</version>
<version>1.0.1</version>

<name>Time It</name>
<description>Library to log the execution time in your Spring Boot components</description>
Expand Down

0 comments on commit a9239e1

Please sign in to comment.