Skip to content

Commit

Permalink
Publish only tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
tarao committed Nov 9, 2023
1 parent 66c93c1 commit e77e4f0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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]
Expand Down
4 changes: 1 addition & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e77e4f0

Please sign in to comment.