File tree Expand file tree Collapse file tree 2 files changed +14
-24
lines changed Expand file tree Collapse file tree 2 files changed +14
-24
lines changed Original file line number Diff line number Diff line change 1- name : " PR Build"
1+ name : Build Pull Request
22
33on :
44 pull_request :
88permissions :
99 contents : read
1010
11+ concurrency :
12+ group : ${{ github.workflow }}-${{ github.event.pull_request.number }}
13+ cancel-in-progress : true
14+
1115jobs :
1216 build :
1317 name : Build
1418 runs-on : ubuntu-latest
1519 steps :
1620 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17- with :
18- # the nebula plugin used in this repo needs the tags
19- fetch-depth : 0
2021
2122 - id : setup-java-17
2223 name : Setup Java 17
2930 uses : gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
3031
3132 - name : Build
32- run : >
33- ./gradlew build --stacktrace
34- "-Porg.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}"
33+ run : ./gradlew build
Original file line number Diff line number Diff line change 1- name : " Main Build"
1+ name : Build
22
33on :
44 push :
55 branches :
66 - main
7+ - release/*
78
89permissions :
910 contents : read
1011
1112jobs :
12- build :
13- name : Build
13+ publish-snapshots :
1414 runs-on : ubuntu-latest
15+ # skipping release branches because the versions in those branches are not snapshots
16+ if : github.ref_name == 'main' && github.repository == 'open-telemetry/opentelemetry-proto-java'
1517 steps :
1618 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
17- with :
18- # the nebula plugin used in this repo needs the tags
19- fetch-depth : 0
2019
21- - id : setup-java-17
22- name : Setup Java 17
20+ - name : Set up JDK for running Gradle
2321 uses : actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
2422 with :
2523 distribution : temurin
@@ -28,17 +26,10 @@ jobs:
2826 - name : Set up gradle
2927 uses : gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
3028
31- - name : Build
32- run : >
33- ./gradlew build --stacktrace
34- "-Porg.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}"
35-
36- - name : Publish snapshot
29+ - name : Build and publish snapshots
30+ run : ./gradlew assemble publishToSonatype
3731 env :
3832 SONATYPE_USER : ${{ secrets.SONATYPE_USER }}
3933 SONATYPE_KEY : ${{ secrets.SONATYPE_KEY }}
4034 GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
4135 GPG_PASSWORD : ${{ secrets.GPG_PASSWORD }}
42- run : >
43- ./gradlew snapshot --stacktrace
44- "-Porg.gradle.java.installations.paths=${{ steps.setup-java-17.outputs.path }}"
You can’t perform that action at this time.
0 commit comments