-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (53 loc) · 1.83 KB
/
release.yaml
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
name: PerfIO Release
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
workflow_dispatch:
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
name: Release
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
java-version: |
21
23
distribution: 'temurin'
cache: 'sbt'
- name: Set up sbt
uses: sbt/setup-sbt@v1
- name: Set up GPG keys
env:
SIGNING_KEY_PRIVATE: ${{ secrets.SIGNING_KEY_PRIVATE }}
SIGNING_KEY_PUBLIC: ${{ secrets.SIGNING_KEY_PUBLIC }}
run: |
echo "$SIGNING_KEY_PUBLIC" | gpg --import
mkdir -p ~/.gnupg/private-keys-v1.d # workaround for a gpg bug
echo "$SIGNING_KEY_PRIVATE" | gpg --passphrase=${{ secrets.SIGNING_KEY_PASSPHRASE }} --pinentry-mode=loopback --batch --import
- name: Publish
env:
PGP_PASSPHRASE: ${{ secrets.SIGNING_KEY_PASSPHRASE }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
# Publish binaries with Java 21 (because we can't use --enable-preview for 21 from 23)
PATH=$JAVA_HOME_21_X64:$PATH JAVA_HOME=$JAVA_HOME_21_X64 JAVA_OPTS=--enable-preview sbt \
"set core/Compile/packageDoc/publishArtifact := false" \
core/publishSigned
# Publish javadoc with Java 23 (because we need Markdown support)
PATH=$JAVA_HOME_23_X64:$PATH JAVA_HOME=$JAVA_HOME_23_X64 sbt \
"set core/Compile/packageSrc/publishArtifact := false" \
"set core/Compile/packageBin/publishArtifact := false" \
core/publishSigned
ls -lR target/sonatype-staging
JAVA_HOME=$JAVA_HOME_23_X64 sbt sonatypeCentralUpload