Skip to content

Commit

Permalink
Try without ossrh
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienvermeille committed May 14, 2023
1 parent 45f75ba commit 3dbd74c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,35 @@ on:
types: [created]
jobs:
publish:
environment: prod
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
# - name: Set up Java for publishing to Maven Central Repository
# uses: actions/setup-java@v3
# with:
# java-version: '20'
# 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.MAVEN_USERNAME_OSSRH }}
# MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD_OSSRH }}
- name: Set up Java for publishing to GitHub Packages
- name: Set up Java for publishing to Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '20'
distribution: 'temurin'
- name: Publish to GitHub Packages
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish to the Maven Central Repository
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME_OSSRH }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD_OSSRH }}
# - name: Set up Java for publishing to GitHub Packages
# uses: actions/setup-java@v3
# with:
# java-version: '20'
# distribution: 'temurin'
# - name: Publish to GitHub Packages
# run: mvn --batch-mode deploy
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
Expand All @@ -41,8 +42,7 @@ jobs:
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_SECRET }}
-
name: Build and push
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
Expand Down
22 changes: 11 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,18 +193,18 @@
</pluginRepositories>

<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/sebastienvermeille/rika2mqtt</url>
</repository>
<!-- <snapshotRepository>-->
<!-- <id>ossrh</id>-->
<!-- <url>https://oss.sonatype.org/content/repositories/snapshots</url>-->
<!-- </snapshotRepository>-->
<!-- <repository>-->
<!-- <id>ossrh</id>-->
<!-- <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>-->
<!-- <id>github</id>-->
<!-- <name>GitHub Packages</name>-->
<!-- <url>https://maven.pkg.github.com/sebastienvermeille/rika2mqtt</url>-->
<!-- </repository>-->
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
</project>

0 comments on commit 3dbd74c

Please sign in to comment.