From e77e4f021847a5cd735ab7bab4402c50ab2026cc Mon Sep 17 00:00:00 2001 From: tarao Date: Thu, 9 Nov 2023 15:52:06 +0900 Subject: [PATCH] Publish only tags. --- .github/workflows/ci.yml | 8 ++++---- build.sbt | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 881490a..0e2d105 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -114,15 +114,15 @@ jobs: run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc - name: Make target directories - if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) run: mkdir -p modules/core/.native/target modules/core/.js/target modules/circe/.js/target modules/circe/.jvm/target modules/circe/.native/target modules/core/.jvm/target project/target - name: Compress target directories - if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) run: tar cf targets.tar modules/core/.native/target modules/core/.js/target modules/circe/.js/target modules/circe/.jvm/target modules/circe/.native/target modules/core/.jvm/target project/target - name: Upload target directories - if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) uses: actions/upload-artifact@v3 with: name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }}-${{ matrix.project }} @@ -131,7 +131,7 @@ jobs: publish: name: Publish Artifacts needs: [build] - if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) strategy: matrix: os: [ubuntu-latest] diff --git a/build.sbt b/build.sbt index 393d286..6926bb3 100644 --- a/build.sbt +++ b/build.sbt @@ -129,6 +129,4 @@ lazy val benchmark_2_11 = (project in file("modules/benchmark_2_11")) ) ThisBuild / githubWorkflowTargetBranches := Seq("master") -ThisBuild / githubWorkflowPublishTargetBranches := Seq( - RefPredicate.Equals(Ref.Branch("master")), -) +ThisBuild / tlCiReleaseBranches := Seq() // publish only tags