-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (58 loc) · 1.77 KB
/
publish-release.yml
File metadata and controls
60 lines (58 loc) · 1.77 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Publish release
on:
workflow_call:
inputs:
java-version:
required: false
type: string
default: "11"
java-opts:
required: false
type: string
default: ""
sttp-native:
required: false
type: number
default: 0
jobs:
publish:
name: Publish release
runs-on: ubuntu-24.04
env:
JAVA_OPTS: ${{inputs.java-opts}}
STTP_NATIVE: ${{inputs.sttp-native}}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: ${{inputs.java-version}}
cache: 'sbt'
- uses: sbt/setup-sbt@3e125ece5c3e5248e18da9ed8d2cce3d335ec8dd # v1, specifically v1.1.14
- name: Compile
run: sbt compile
- name: Publish artifacts
run: sbt ci-release
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
- name: Extract version from commit message
run: |
version=${GITHUB_REF/refs\/tags\/v/}
echo "VERSION=$version" >> $GITHUB_ENV
env:
COMMIT_MSG: ${{ github.event.head_commit.message }}
- name: Publish release notes
uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6, specifically v6.1.0
with:
config-name: release-drafter.yml
publish: true
name: "v${{ env.VERSION }}"
tag: "v${{ env.VERSION }}"
version: "v${{ env.VERSION }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}