diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e4691bd..9628c432 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -103,15 +103,15 @@ jobs: run: sbt 'project ${{ matrix.project }}' '++ ${{ matrix.scala }}' doc - name: Make target directories - if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') run: mkdir -p generic-extras/.js/target generic-extras/.jvm/target generic-extras/.native/target project/target - name: Compress target directories - if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') run: tar cf targets.tar generic-extras/.js/target generic-extras/.jvm/target generic-extras/.native/target project/target - name: Upload target directories - if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main') + 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 }}-${{ matrix.project }} @@ -120,7 +120,7 @@ jobs: publish: name: Publish Artifacts needs: [build] - if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main') + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') strategy: matrix: os: [ubuntu-latest]