Skip to content

Commit 5a32093

Browse files
committed
add github actions publish workflow step
1 parent d50a23d commit 5a32093

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,37 @@ jobs:
4545
uses: codecov/codecov-action@v1
4646
with:
4747
fail_ci_if_error: true
48+
49+
publish:
50+
name: Publish
51+
needs: [build]
52+
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v'))
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v2
57+
with:
58+
fetch-depth: 0
59+
60+
- name: Setup Scala
61+
uses: olafurpg/setup-scala@v10
62+
with:
63+
java-version: "[email protected]"
64+
65+
- uses: actions/cache@v2
66+
with:
67+
path: |
68+
~/.sbt
69+
~/.ivy2/cache
70+
~/.coursier/cache/v1
71+
~/.cache/coursier/v1
72+
key: |
73+
${{ runner.os }}-sbt-${{ hashFiles('project/build.properties') }}-${{ hashFiles('**/*.sbt') }}
74+
75+
- name: Publish artifacts
76+
env:
77+
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
78+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
79+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
80+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
81+
run: sbt ci-release

0 commit comments

Comments
 (0)