-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (45 loc) · 1.14 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
45
46
47
48
name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
pr-check:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
statuses: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- run: npm install
- run: npm ci
- run: npx danger ci --verbose --failOnErrorsdanger
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ubuntu-latest
if: ${{ always() }}
needs:
- pr-check
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
server-id: github
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Build with Maven
run: mvn -B verify
env:
MAVEN_USERNAME: ${{ vars.PACKAGES_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.PACKAGES_PASSWORD }}