-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (43 loc) · 1.29 KB
/
build.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
44
on:
push:
branches:
- master
pull_request_target:
branches:
- master
jobs:
build:
runs-on: 'ubuntu-latest'
steps:
- name: Decide the ref to check out
uses: haya14busa/action-cond@v1
id: condval
with:
cond: ${{ github.event_name == 'pull_request_target' }}
if_true: refs/pull/${{ github.event.pull_request.number }}/merge
if_false: ${{ github.ref }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ steps.condval.outputs.value }}
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.SIGNING_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- run: |
./mvnw -V -B verify
npm ci
npx semantic-release
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.SIGNING_PASSWORD }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}