Skip to content

Commit

Permalink
Fix the complicated artifacts publish process
Browse files Browse the repository at this point in the history
  • Loading branch information
pomadchin committed Nov 10, 2021
1 parent e850090 commit f1a7229
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,16 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.15, 2.13.7]
java: [adopt@1.8]
runs-on: ${{ matrix.os }}
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
CI_SNAPSHOT_RELEASE: "frameless-publish"
CI_RELEASE: "frameless-publishSigned"

steps:
- uses: actions/checkout@v2
with:
Expand All @@ -67,15 +74,18 @@ jobs:
with:
java-version: ${{ matrix.java }}

- name: Publish artifacts
run: sbt ++${{ matrix.scala }} ci-release
# Sequentially publish different artifacts for different Scala versions.
# Doing that in parallel may cause unclosed staging repositories drop.
- name: Publish Scala 2.12.15 artifacts
run: sbt ++$SCALA_VERSION ci-release
env:
SCALA_VERSION: 2.12.15
if: ${{ env.SONATYPE_PASSWORD != '' && env.SONATYPE_USERNAME != '' }}

- name: Publish Scala 2.13.7 artifacts
run: sbt ++$SCALA_VERSION ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
CI_SNAPSHOT_RELEASE: "frameless-publish"
CI_RELEASE: "frameless-publishSigned"
SCALA_VERSION: 2.13.7
if: ${{ env.SONATYPE_PASSWORD != '' && env.SONATYPE_USERNAME != '' }}

docs:
Expand Down

0 comments on commit f1a7229

Please sign in to comment.