Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove publish tag again #63

Merged
merged 2 commits into from
May 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/merged.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: "Build Test and Deploy"
on:
push:
pull_request_target:
paths-ignore:
- '*.md'
branches: [ main ]
types:
- closed
env:
username: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
password: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
jobs:
create-staging-repository:
if: github.event.pull_request.merged == true
name: Create staging repository
runs-on: ubuntu-latest
outputs:
Expand All @@ -30,6 +33,7 @@ jobs:
fi
macos:
name: MacOS Build & Upload artifacts to sonatype
if: github.event.pull_request.merged == true
needs: create-staging-repository
runs-on: macOS-latest
env:
Expand Down Expand Up @@ -67,7 +71,7 @@ jobs:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
GPG_SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }}
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
run: ./gradlew publishAllPublicationsToSonatypeRepository publishTag -PincrementMajor=true
run: ./gradlew publishAllPublicationsToSonatypeRepository -PincrementMajor=true
- name: Test and deploy with Gradle Minor
if: ${{ contains(github.event.pull_request.labels.*.name, 'minor') }}
env:
Expand All @@ -76,7 +80,7 @@ jobs:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
GPG_SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }}
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
run: ./gradlew publishAllPublicationsToSonatypeRepository publishTag -PincrementMinor=true
run: ./gradlew publishAllPublicationsToSonatypeRepository -PincrementMinor=true
- name: Test and deploy with Gradle Patch
if: ${{ !contains(github.event.pull_request.labels.*.name, 'major') && !contains(github.event.pull_request.labels.*.name, 'minor') }}
env:
Expand All @@ -85,15 +89,15 @@ jobs:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
GPG_SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }}
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
run: ./gradlew publishAllPublicationsToSonatypeRepository publishTag
run: ./gradlew publishAllPublicationsToSonatypeRepository
- uses: actions/upload-artifact@v3
with:
name: Package
path: build/libs
finalize:
runs-on: ubuntu-latest
needs: [create-staging-repository, macos]
if: ${{ always() && needs.create-staging-repository.result == 'success' }}
if: ${{ always() && needs.create-staging-repository.result == 'success' && github.event.pull_request.merged == true }}
steps:
- name: Discard
if: ${{ needs.macos.result != 'success' }}
Expand Down
Loading