|
1 | 1 | name: Release |
2 | 2 | on: |
3 | | - workflow_run: |
4 | | - workflows: ["CI"] |
5 | | - types: [completed] |
6 | 3 | push: |
7 | | - branches: [main] |
8 | | - tags: ["*"] |
| 4 | + branches: [ main ] |
| 5 | + tags: |
| 6 | + - v[1-9]+.[0-9]+.[0-9]+ |
9 | 7 | jobs: |
10 | | - publish: |
| 8 | + release: |
11 | 9 | runs-on: ubuntu-20.04 |
12 | | - if: ${{ github.event.workflow_run.conclusion == 'success' }} |
| 10 | + env: |
| 11 | + JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 |
| 12 | + JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8 |
| 13 | + AWS_REGION: ap-northeast-1 |
| 14 | + TEST_TIME_FACTOR: 3 |
13 | 15 | steps: |
14 | | - |
15 | | - with: |
16 | | - fetch-depth: 0 |
17 | | - ref: ${{ github.event.workflow_run.head_branch }} |
18 | | - - uses: olafurpg/setup-scala@v10 |
19 | | - - uses: olafurpg/setup-gpg@v3 |
20 | | - - run: | |
21 | | - sbt ci-release |
22 | | - env: |
23 | | - PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} |
24 | | - PGP_SECRET: ${{ secrets.PGP_SECRET }} |
25 | | - SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |
26 | | - SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |
| 16 | + |
| 17 | + with: |
| 18 | + fetch-depth: 0 |
| 19 | + - uses: olafurpg/setup-scala@v10 |
| 20 | + with: |
| 21 | + |
| 22 | + - uses: coursier/cache-action@v5 |
| 23 | + - uses: olafurpg/setup-gpg@v3 |
| 24 | + - run: sbt -v scalafmtCheckAll |
| 25 | + - run: sbt -v +test |
| 26 | + - run: sbt -v ci-release |
| 27 | + env: |
| 28 | + PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} |
| 29 | + PGP_SECRET: ${{ secrets.PGP_SECRET }} |
| 30 | + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |
| 31 | + SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} |
| 32 | + - name: clean up |
| 33 | + run: | |
| 34 | + rm -rf "$HOME/.ivy2/local" || true |
| 35 | + find $HOME/Library/Caches/Coursier/v1 -name "ivydata-*.properties" -delete || true |
| 36 | + find $HOME/.ivy2/cache -name "ivydata-*.properties" -delete || true |
| 37 | + find $HOME/.cache/coursier/v1 -name "ivydata-*.properties" -delete || true |
| 38 | + find $HOME/.sbt -name "*.lock" -delete || true |
0 commit comments