-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (35 loc) · 1.11 KB
/
build.yml
File metadata and controls
43 lines (35 loc) · 1.11 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
name: build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up java
uses: actions/setup-java@v2.1.0
with:
distribution: 'adopt'
java-version: 14
java-package: jre
- name: Build JVM
run: ./mill bencode.test
- name: Build native
run: ./mill bencode.native.test
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Release
if: startsWith(github.ref, 'refs/tags/v')
env:
SONATYPE_CREDS: ${{ secrets.SONATYPE_CREDS }}
PGP_SECRET_KEY: ${{ secrets.PGP_SECRET_KEY }}
run: |
echo ${PGP_SECRET_KEY} | base64 --decode | gpg --import
export VERSION=${GITHUB_REF#*/v}
echo Publishing $VERSION
echo Publishing JVM
./mill bencode.publish --sonatypeCreds $SONATYPE_CREDS --gpgArgs --batch --gpgArgs -ab --gpgArgs --yes
echo Publishing native
./mill bencode.native.publish --sonatypeCreds $SONATYPE_CREDS --gpgArgs --batch --gpgArgs -ab --gpgArgs --yes