Run publish step only on main repository

This commit is contained in:
Michael Bull 2024-03-04 22:19:19 +00:00
parent 2acedfa898
commit f91b7c1efa

View File

@ -1,10 +1,10 @@
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
push:
branches: [ "master" ]
permissions:
contents: read
@ -58,9 +58,8 @@ jobs:
publish:
name: Publish
runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/master' && github.repository == 'michaelbull/kotlin-result'
needs: build
if: github.ref == 'refs/heads/master' && github.event_name == 'push' && needs.build.result == 'success'
strategy:
matrix: