From b04f1cf3a08e831735e89c17fddf422a216f4a9d Mon Sep 17 00:00:00 2001 From: Brian Holt Date: Wed, 25 Sep 2024 12:14:46 -0500 Subject: [PATCH] publish snapshots when PRs are merged into main --- .github/workflows/ci.yml | 8 ++++---- build.sbt | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94635f8..c4823e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,15 +61,15 @@ jobs: - run: sbt '++ ${{ matrix.scala }}' compile test - name: Make target directories - if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') run: mkdir -p target scalafix/rules/target project/target - name: Compress target directories - if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') run: tar cf targets.tar target scalafix/rules/target project/target - name: Upload target directories - if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') uses: actions/upload-artifact@v4 with: name: target-${{ matrix.os }}-${{ matrix.java }}-${{ matrix.scala }} @@ -78,7 +78,7 @@ jobs: publish: name: Publish Artifacts needs: [build] - if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') strategy: matrix: os: [ubuntu-latest] diff --git a/build.sbt b/build.sbt index bfff201..49c1b4b 100644 --- a/build.sbt +++ b/build.sbt @@ -21,6 +21,7 @@ ThisBuild / startYear := Option(2018) ThisBuild / tlBaseVersion := "0.4" ThisBuild / tlJdkRelease := Some(8) ThisBuild / githubWorkflowBuild := List(Sbt(List("compile", "test"))) +ThisBuild / tlCiReleaseBranches := Seq("main") lazy val `smithy4s-preprocessors` = project .in(file("smithy4s-preprocessors"))