diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 27ca792bfb5..3317a35a1ae 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -92,7 +92,8 @@ jobs: run: ${{ matrix.buildcmd }} publish-sonatype: - if: github.repository == 'com-lihaoyi/mill' && github.ref == 'refs/heads/main' + # when in master repo: all commits to main branch and all additional tags + if: github.repository == 'com-lihaoyi/mill' && ( github.ref == 'refs/heads/main' || (github.ref != 'refs/heads/main' && startsWith( github.ref, 'refs/tags/') ) ) needs: [test, test-windows] runs-on: ubuntu-latest @@ -118,7 +119,8 @@ jobs: - run: ci/release-maven.sh release-github: - if: github.repository == 'com-lihaoyi/mill' && github.ref == 'refs/heads/main' + # when in master repo: all commits to main branch and all additional tags + if: github.repository == 'com-lihaoyi/mill' && ( github.ref == 'refs/heads/main' || (github.ref != 'refs/heads/main' && startsWith( github.ref, 'refs/tags/') ) ) needs: publish-sonatype runs-on: ubuntu-latest