From c7c7e05d9d2b3f7454e6dd09ef2f8efb00218c7f Mon Sep 17 00:00:00 2001 From: Peter Johnson Date: Sat, 30 Sep 2023 10:19:32 -0700 Subject: [PATCH] [ci] Unbreak combiner (#5698) --- .github/workflows/gradle.yml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 3b30fa446e..38d1c95311 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -187,29 +187,35 @@ jobs: name: Combine needs: [build-docker, build-host, build-documentation] runs-on: ubuntu-22.04 - env: - main_or_release: github.repository_owner == 'wpilibsuite' && - (github.ref == 'refs/heads/main' || - startsWith(github.ref, 'refs/tags/v')) steps: - uses: actions/checkout@v3 - if: env.main_or_release == 'true' + if: | + github.repository_owner == 'wpilibsuite' && + (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) with: repository: wpilibsuite/build-tools - uses: actions/download-artifact@v3 - if: env.main_or_release == 'true' + if: | + github.repository_owner == 'wpilibsuite' && + (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) with: path: combiner/products/build/allOutputs - name: Flatten Artifacts - if: env.main_or_release == 'true' + if: | + github.repository_owner == 'wpilibsuite' && + (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) run: rsync -a --delete combiner/products/build/allOutputs/*/* combiner/products/build/allOutputs/ - name: Check version number exists - if: env.main_or_release == 'true' + if: | + github.repository_owner == 'wpilibsuite' && + (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) run: | cat combiner/products/build/allOutputs/version.txt test -s combiner/products/build/allOutputs/version.txt - uses: actions/setup-java@v3 - if: env.main_or_release == 'true' + if: | + github.repository_owner == 'wpilibsuite' && + (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) with: distribution: 'zulu' java-version: 11 @@ -232,7 +238,9 @@ jobs: ARTIFACTORY_PUBLISH_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} ARTIFACTORY_PUBLISH_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} - uses: actions/upload-artifact@v3 - if: env.main_or_release == 'true' + if: | + github.repository_owner == 'wpilibsuite' && + (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) with: name: Maven path: ~/releases