diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f62cf4..47ae5b2 100755 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Publish package to the Maven Central Repository and GitHub Packages +name: Publish package to the GitHub Packages on: release: types: [created] @@ -9,25 +9,14 @@ jobs: contents: read packages: write steps: - - uses: actions/checkout@v4 - - name: Set up Java for publishing to Maven Central Repository - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - - name: Publish to the Maven Central Repository - run: mvn --batch-mode deploy - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} - name: Set up Java for publishing to GitHub Packages uses: actions/setup-java@v4 with: java-version: '21' distribution: 'temurin' + server-id: 'github' + - name: Build with Maven + run: mvn -B package --file pom.xml - name: Publish to GitHub Packages run: mvn --batch-mode deploy env: