-
Notifications
You must be signed in to change notification settings - Fork 420
43 lines (41 loc) · 1.28 KB
/
push-default-branch.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: Publish Artifacts
on:
push:
branches:
- 'version-1.*.*'
jobs:
update-graph:
name: Update Dependency Graph
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'sbt'
- uses: sbt/setup-sbt@v1
- uses: scalacenter/sbt-dependency-submission@v3
with:
configs-ignore: test compile-internal provided
publish-snapshot:
name: Publish Snapshots to Sonatype
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'sbt'
gpg-private-key: ${{ secrets.OSSRH_GPG_KEY }}
gpg-passphrase: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
- uses: sbt/setup-sbt@v1
- name: Publish snapshots
env:
SONATYPE_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.OSSRH_USERNAME }}
PGP_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
run: |
version=$(awk -F '[".]' '{print $3"."$4"."$5+1}' version.sbt)-SNAPSHOT
sbt -Dproject.version=$version --mem 4096 --batch publishSigned