forked from open-telemetry/opentelemetry-android
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (52 loc) · 1.48 KB
/
build.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: Build
on:
push:
branches:
- main
- release/*
workflow_dispatch:
jobs:
build:
name: "build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK for running Gradle
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: touch local props
run: touch demo-app/local.properties
- name: run gradle check
run: ./gradlew check
- name: build demo app
working-directory: ./demo-app
run: ./gradlew check assemble
- name: publish snapshot
run: ./gradlew publishToSonatype
env:
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
markdown-link-check:
# release branches are excluded to avoid unnecessary maintenance
if: ${{ !startsWith(github.ref_name, 'release/') }}
uses: ./.github/workflows/reusable-markdown-link-check.yml
workflow-notification:
needs:
- build
if: failure() && github.run_attempt == 1
uses: ./.github/workflows/reusable-workflow-notification.yml
with:
success: ${{ needs.build.result == 'success' }}
required-status-check:
needs:
- build
runs-on: ubuntu-latest
if: always()
steps:
- if: |
needs.build.result != 'success'
run: exit 1