Skip to content

Commit

Permalink
Merge pull request #140 from ligangty/main
Browse files Browse the repository at this point in the history
Disable sonatype push for snapshot builds
  • Loading branch information
ligangty authored Mar 4, 2024
2 parents 44c74fd + bc5a7a3 commit 11536e1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/merge-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on: [push]

jobs:
publish-snapshot:
name: publish to oss sonatype & push image
name: Build & push image

runs-on: ubuntu-latest

Expand All @@ -46,18 +46,16 @@ jobs:

- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v14
if: ${{ github.event.repository.fork == false }}
with:
repositories: '[{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]'
servers: '[{ "id": "sonatype", "username": "${{ secrets.SONATYPE_BOT_USERNAME}}", "password": "${{ secrets.SONATYPE_BOT_TOKEN}}" }]'

- name: "Maven Verify"
if: ${{ github.event.repository.fork == true }}
run: mvn -B -e verify

- name: "Maven Build & Deploy Snapshot to Sonatype OSSRH"
- name: "Maven Build"
if: ${{ github.event.repository.fork == false }}
run: mvn -B -e deploy -DaltDeploymentRepository=sonatype::default::https://oss.sonatype.org/content/repositories/snapshots/
run: mvn -B -e clean install

- name: Checkout tools repo
uses: actions/checkout@v4
Expand Down

0 comments on commit 11536e1

Please sign in to comment.