-
-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (41 loc) · 1.35 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Release
on: [push]
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Scala caches
uses: actions/cache@v2
with:
path: |
~/.sbt
~/.ivy2/cache
~/.cache/coursier
key: ${{ runner.os }}-sbt-docs-${{ hashFiles('**/*.sbt') }}
- uses: actions/setup-java@v1
with:
java-version: 8
- uses: olafurpg/setup-gpg@v3
if: startsWith(github.ref, 'refs/tags/v')
- name: "Publish release: ${{github.ref}}"
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/')"
run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}