Disable publish action in forked repository

This commit is contained in:
Goooler
2021-08-16 22:29:22 +08:00
parent 5379ac8539
commit 2eb40a0cff

View File

@@ -46,7 +46,7 @@ jobs:
run: ./gradlew build check --stacktrace
- name: Publish (default branch only)
if: github.ref == 'refs/heads/master' && matrix.java-version == '8'
if: github.repository == 'square/moshi' && github.ref == 'refs/heads/master' && matrix.java-version == '8'
run: ./gradlew uploadArchives
env:
ORG_GRADLE_PROJECT_SONATYPE_NEXUS_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}