From 4df15874d4b98693c76fa88b12f17f8b68441eec Mon Sep 17 00:00:00 2001 From: "Ross A. Baker" Date: Fri, 4 Dec 2020 15:35:39 -0500 Subject: [PATCH] Regenerate workflow --- .github/workflows/ci.yml | 59 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 126006e..5b2e30a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,4 +65,61 @@ jobs: run: sbt ++${{ matrix.scala }} test - name: Build docs - run: sbt ++${{ matrix.scala }} doc \ No newline at end of file + run: sbt ++${{ matrix.scala }} doc + + - name: Compress target directories + run: tar cf targets.tar target core/target project/target + + - name: Upload target directories + uses: actions/upload-artifact@v2 + with: + name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} + path: targets.tar + + publish: + name: Publish Artifacts + needs: [build] + if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) + strategy: + matrix: + os: [ubuntu-latest] + scala: [2.12.12] + java: [adopt@1.8] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout current branch (full) + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Setup Java and Scala + uses: olafurpg/setup-scala@v10 + with: + java-version: ${{ matrix.java }} + + - name: Cache sbt + uses: actions/cache@v2 + with: + path: | + ~/.sbt + ~/.ivy2/cache + ~/.coursier/cache/v1 + ~/.cache/coursier/v1 + ~/AppData/Local/Coursier/Cache/v1 + ~/Library/Caches/Coursier/v1 + key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }} + + - name: Download target directories (2.12.12) + uses: actions/download-artifact@v2 + with: + name: target-${{ matrix.os }}-2.12.12-${{ matrix.java }} + + - name: Inflate target directories (2.12.12) + run: | + tar xf targets.tar + rm targets.tar + + - name: Import signing key + run: echo $PGP_SECRET | base64 -d | gpg --import + + - run: sbt ++${{ matrix.scala }} release \ No newline at end of file