|
1 | | -name: build dist |
| 1 | +name: build |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | pull_request: |
| 6 | + workflow_call: |
6 | 7 |
|
7 | 8 | jobs: |
8 | 9 | linux-build: |
9 | 10 | name: build on linux |
10 | 11 | runs-on: ubuntu-24.04 |
11 | 12 | steps: |
12 | 13 | - name: checkout |
13 | | - uses: actions/checkout@v1 |
| 14 | + uses: actions/checkout@v4 |
14 | 15 | with: |
15 | 16 | submodules: recursive |
16 | 17 | - name: apt update |
|
21 | 22 | with: |
22 | 23 | java-version: 17 |
23 | 24 | distribution: temurin |
24 | | - # ONLY FOR NEW RELEASE TAGS |
25 | | - - name: setup gpg necessities |
26 | | - if: startsWith(github.ref, 'refs/tags/') |
27 | | - run: sudo bash -c "echo '$GPG_KEY_CONTENTS' | base64 -d > $WORKSPACE/'$SIGNING_SECRET_KEY_RING_FILE'" |
28 | | - env: |
29 | | - WORKSPACE: ${{ github.workspace }} |
30 | | - GPG_KEY_CONTENTS: ${{ secrets.GPG_KEY_CONTENTS }} |
31 | | - SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} |
32 | | - # ONLY FOR NEW RELEASE TAGS |
33 | | - - name: rewrite publish-pom.gradle to require signing |
34 | | - if: startsWith(github.ref, 'refs/tags/') |
35 | | - run: | |
36 | | - sed -i "s/signing {}/signing { sign(publishing.publications) }/" publish-pom.gradle |
37 | 25 | - name: cache AVD |
38 | 26 | uses: actions/cache@v4 |
39 | 27 | env: |
|
55 | 43 | - name: build |
56 | 44 | if: ${{ !startsWith(github.ref, 'refs/tags/') }} |
57 | 45 | run: ./gradlew build dokkaHtml publishToMavenLocal |
58 | | - # ONLY FOR NEW RELEASE TAGS |
59 | | - - name: publish |
60 | | - if: startsWith(github.ref, 'refs/tags/') |
61 | | - run: ./gradlew --warning-mode all publish dokkaHtml |
62 | | - env: |
63 | | - OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }} |
64 | | - OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} |
65 | | - SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} |
66 | | - SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} |
67 | | - SIGNING_SECRET_KEY_RING_FILE: ${{ format('{0}/{1}', github.workspace, secrets.SIGNING_SECRET_KEY_RING_FILE) }} |
68 | 46 | - name: run instrumented tests (disabled) |
69 | 47 | if: false |
70 | 48 | # > Gradle was not able to complete device setup for: dev30_google_x86_Pixel_5 |
|
81 | 59 | path: | |
82 | 60 | ./*/build/outputs/aar/*.aar |
83 | 61 | samples/*/build/outputs/apk/debug/*.apk |
84 | | - # Create release, only for release tags |
85 | | - - name: Create Release |
86 | | - uses: ncipollo/release-action@v1 |
87 | | - if: success() && startsWith(github.ref, 'refs/tags/') |
88 | | - with: |
89 | | - artifacts: ./*/build/outputs/aar/*.aar,samples/*/build/outputs/apk/debug/*.apk |
90 | | - # Update API reference, only for release tags |
91 | | - - name: deploy to GitHub Pages |
92 | | - if: ${{ success() && startsWith(github.ref, 'refs/tags/') }} |
93 | | - uses: JamesIves/github-pages-deploy-action@v4 |
94 | | - with: |
95 | | - branch: gh-pages |
96 | | - folder: androidaudioplugin/build/dokka/html |
97 | 62 |
|
98 | 63 | osx-build: |
99 | 64 | name: build on osx |
|
104 | 69 | with: |
105 | 70 | submodules: recursive |
106 | 71 | - name: set up JDK 17 |
107 | | - uses: actions/setup-java@v3 |
| 72 | + uses: actions/setup-java@v4 |
108 | 73 | with: |
109 | 74 | java-version: 17 |
110 | 75 | distribution: temurin |
|
0 commit comments