Skip to content
name: Deploy Snapshot to Maven Central
on:
push:
branches: [main, 1.0.x]
jobs:
release:
if: github.repository == 'jdbc-observations/datasource-micrometer'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish snapshots
run: ./mvnw -B javadoc:jar source:jar deploy -DskipTests=true
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}