diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index d293f33..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: CI - -on: [push, pull_request] - -jobs: - build: - runs-on: ${{matrix.os}} - strategy: - matrix: - os: ["ubuntu-20.04"] - - steps: - - uses: actions/checkout@v2 - - uses: olafurpg/setup-scala@v10 - with: - java-version: 8 - - name: Mount caches - uses: actions/cache@v2 - with: - path: | - ~/.sbt - ~/.ivy2/cache - ~/.cache/coursier - key: ${{ runner.os }}-sbt-${{ hashFiles('**/*.sbt') }} - - name: Compile and test - run: | - sbt test - shell: bash - - name: Format check - if: ${{ runner.os == 'Linux' }} - run: | - sbt scalafmtCheck test:scalafmtCheck scalafmtSbtCheck - # Single final job for mergify. - ci-passed: - runs-on: ubuntu-latest - needs: build - steps: - - run: ':' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6b5cb1e..99e7d32 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,15 +21,20 @@ jobs: - uses: olafurpg/setup-gpg@v3 if: startsWith(github.ref, 'refs/tags/v') - name: "Publish release: ${{github.ref}}" - if: startsWith(github.ref, 'refs/tags/v') - run: PUBLISH_ONLY=${GITHUB_REF%%/*} RELEASE=1 sbt ci-release + if: startsWith(github.ref, 'refs/tags/') + shell: bash + run: | + echo GITHUB_REF=$GITHUB_REF + export PUBLISH_ONLY=$(echo $GITHUB_REF | grep -P "refs/tags/(\K[^/]*)" -o) + echo PUBLISH_ONLY=$PUBLISH_ONLY + RELEASE=1 sbt ci-release env: PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} PGP_SECRET: ${{ secrets.PGP_SECRET }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} - name: "Publish snapshot: ${{github.ref}}" - if: "!startsWith(github.ref, 'refs/tags/v')" + if: "!startsWith(github.ref, 'refs/tags/')" run: sbt ci-release env: PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}