|
| 1 | +# This file was automatically generated by sbt-github-actions using the |
| 2 | +# githubWorkflowGenerate task. You should add and commit this file to |
| 3 | +# your git repository. It goes without saying that you shouldn't edit |
| 4 | +# this file by hand! Instead, if you wish to make changes, you should |
| 5 | +# change your sbt build configuration to revise the workflow description |
| 6 | +# to meet your needs, then regenerate this file. |
| 7 | + |
| 8 | +# This file was changed, to test that githubWorkflowUpdate will overwrite |
| 9 | +# all such changes *except* references to actions by hash. |
| 10 | + |
| 11 | +name: Continuous Integration |
| 12 | + |
| 13 | +on: |
| 14 | + pull_request: |
| 15 | + branches: ['**'] |
| 16 | + push: |
| 17 | + branches: ['**'] |
| 18 | + |
| 19 | +env: |
| 20 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 21 | + |
| 22 | +jobs: |
| 23 | + build: |
| 24 | + name: Build and Test |
| 25 | + strategy: |
| 26 | + matrix: |
| 27 | + os: [ubuntu-latest] |
| 28 | + scala: [2.13.10] |
| 29 | + java: [zulu@8] |
| 30 | + runs-on: ${{ matrix.os }} |
| 31 | + steps: |
| 32 | + - name: Checkout current branch (full) |
| 33 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 34 | + with: |
| 35 | + fetch-depth: 0 |
| 36 | + |
| 37 | + - name: Setup Java (zulu@8) |
| 38 | + if: matrix.java == 'zulu@8' |
| 39 | + uses: actions/setup-java@v5 |
| 40 | + with: |
| 41 | + distribution: zulu |
| 42 | + java-version: 8 |
| 43 | + cache: sbt |
| 44 | + |
| 45 | + - name: Setup sbt |
| 46 | + uses: sbt/setup-sbt@v1 |
| 47 | + |
| 48 | + - name: Check that workflows are up to date |
| 49 | + run: sbt '++ ${{ matrix.scala }}; githubWorkflowCheck' |
| 50 | + |
| 51 | + - name: Build project |
| 52 | + run: sbt '++ ${{ matrix.scala }}; test' |
| 53 | + |
| 54 | + - name: Compress target directories |
| 55 | + run: tar cf targets.tar target project/target |
| 56 | + |
| 57 | + - name: Upload target directories |
| 58 | + uses: actions/upload-artifact@v7 |
| 59 | + with: |
| 60 | + name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }} |
| 61 | + path: targets.tar |
| 62 | + |
| 63 | + publish: |
| 64 | + name: Publish Artifacts |
| 65 | + needs: [build] |
| 66 | + if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main') |
| 67 | + strategy: |
| 68 | + matrix: |
| 69 | + os: [ubuntu-latest] |
| 70 | + scala: [2.13.10] |
| 71 | + java: [zulu@8] |
| 72 | + runs-on: ${{ matrix.os }} |
| 73 | + steps: |
| 74 | + - name: Checkout current branch (full) |
| 75 | + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 |
| 76 | + with: |
| 77 | + fetch-depth: 0 |
| 78 | + |
| 79 | + - name: Setup Java (zulu@8) |
| 80 | + if: matrix.java == 'zulu@8' |
| 81 | + uses: actions/setup-java@v5 |
| 82 | + with: |
| 83 | + distribution: zulu |
| 84 | + java-version: 8 |
| 85 | + cache: sbt |
| 86 | + |
| 87 | + - name: Setup sbt |
| 88 | + uses: sbt/setup-sbt@v1 |
| 89 | + |
| 90 | + - name: Download target directories (2.13.10) |
| 91 | + uses: actions/download-artifact@v8 |
| 92 | + with: |
| 93 | + name: target-${{ matrix.os }}-2.13.10-${{ matrix.java }} |
| 94 | + |
| 95 | + - name: Inflate target directories (2.13.10) |
| 96 | + run: | |
| 97 | + tar xf targets.tar |
| 98 | + rm targets.tar |
| 99 | +
|
| 100 | + - name: Publish project |
| 101 | + run: sbt +publish |
0 commit comments