@@ -102,19 +102,7 @@ jobs:
102102 SONATYPE_KEY : ${{ secrets.SONATYPE_KEY }}
103103 GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
104104 GPG_PASSWORD : ${{ secrets.GPG_PASSWORD }}
105- run : ./gradlew assemble spdxSbom publishToSonatype closeAndReleaseSonatypeStagingRepository
106-
107- - name : Build and publish gradle plugins
108- env :
109- SONATYPE_USER : ${{ secrets.SONATYPE_USER }}
110- SONATYPE_KEY : ${{ secrets.SONATYPE_KEY }}
111- GRADLE_PUBLISH_KEY : ${{ secrets.GRADLE_PUBLISH_KEY }}
112- GRADLE_PUBLISH_SECRET : ${{ secrets.GRADLE_PUBLISH_SECRET }}
113- GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
114- GPG_PASSWORD : ${{ secrets.GPG_PASSWORD }}
115- # Don't use publishToSonatype since we don't want to publish the marker artifact
116- run : ./gradlew build publishPlugins publishPluginMavenPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository
117- working-directory : gradle-plugins
105+ run : ./gradlew assemble spdxSbom
118106
119107 - name : Collect SBOMs
120108 run : |
@@ -198,128 +186,3 @@ jobs:
198186 opentelemetry-javaagent.jar \
199187 opentelemetry-java-instrumentation-SBOM.zip \
200188 attestations.intoto.jsonl
201-
202- echo "version=$VERSION" >> $GITHUB_OUTPUT
203- echo "prior-version=$PRIOR_VERSION" >> $GITHUB_OUTPUT
204-
205- merge-change-log-to-main :
206- permissions :
207- contents : write # for git push to PR branch
208- runs-on : ubuntu-latest
209- needs :
210- - release
211- steps :
212- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
213-
214- - name : Copy change log section from release branch
215- env :
216- VERSION : ${{ needs.release.outputs.version }}
217- run : |
218- sed -n "0,/^## Version $VERSION /d;/^## Version /q;p" CHANGELOG.md \
219- > /tmp/changelog-section.md
220-
221- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
222- with :
223- ref : main
224-
225- - name : Merge change log to main
226- env :
227- VERSION : ${{ needs.release.outputs.version }}
228- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
229- run : |
230- release_date=$(gh release view v$VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//')
231- RELEASE_DATE=$release_date .github/scripts/merge-change-log-after-release.sh
232-
233- - name : Use CLA approved bot
234- run : .github/scripts/use-cla-approved-bot.sh
235-
236- - uses : actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
237- id : otelbot-token
238- with :
239- app-id : ${{ vars.OTELBOT_APP_ID }}
240- private-key : ${{ secrets.OTELBOT_PRIVATE_KEY }}
241-
242- - name : Create pull request against main
243- env :
244- VERSION : ${{ needs.release.outputs.version }}
245- # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
246- GH_TOKEN : ${{ steps.otelbot-token.outputs.token }}
247- run : |
248- if git diff --quiet; then
249- if [[ $VERSION == *.0 ]]; then
250- echo there are no updates to merge, not creating pull request
251- exit 0 # success
252- else
253- echo patch release notes did not get applied for some reason
254- exit 1 # failure
255- fi
256- fi
257-
258- message="Merge change log updates from $GITHUB_REF_NAME"
259- body="Merge change log updates from \`$GITHUB_REF_NAME\`."
260- branch="otelbot/merge-change-log-updates-from-${GITHUB_REF_NAME//\//-}"
261-
262- git checkout -b $branch
263- git commit -a -m "$message"
264- git push --set-upstream origin $branch
265- gh pr create --title "$message" \
266- --body "$body" \
267- --base main
268-
269- update-apidiff-baseline-to-released-version :
270- runs-on : ubuntu-latest
271- needs :
272- - release
273- steps :
274- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
275- with :
276- ref : main
277-
278- - name : Wait for release to be available in maven central
279- env :
280- VERSION : ${{ needs.release.outputs.version }}
281- run : |
282- until curl --silent \
283- --show-error \
284- --output /dev/null \
285- --head \
286- --fail \
287- https://repo1.maven.org/maven2/io/opentelemetry/javaagent/opentelemetry-javaagent/$VERSION/opentelemetry-javaagent-$VERSION.jar
288- do
289- sleep 60
290- done
291-
292- - name : Update apidiff baseline
293- env :
294- VERSION : ${{ needs.release.outputs.version }}
295- PRIOR_VERSION : ${{ needs.release.outputs.prior-version }}
296- run : |
297- ./gradlew japicmp -PapiBaseVersion=$PRIOR_VERSION -PapiNewVersion=$VERSION
298- ./gradlew --refresh-dependencies japicmp
299-
300- - name : Use CLA approved bot
301- run : .github/scripts/use-cla-approved-bot.sh
302-
303- - uses : actions/create-github-app-token@67e27a7eb7db372a1c61a7f9bdab8699e9ee57f7 # v1.11.3
304- id : otelbot-token
305- with :
306- app-id : ${{ vars.OTELBOT_APP_ID }}
307- private-key : ${{ secrets.OTELBOT_PRIVATE_KEY }}
308-
309- - name : Create pull request against main
310- env :
311- VERSION : ${{ needs.release.outputs.version }}
312- # not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
313- GH_TOKEN : ${{ steps.otelbot-token.outputs.token }}
314- run : |
315- message="Update apidiff baseline to released version $VERSION"
316- body="Update apidiff baseline to released version \`$version\`."
317- branch="otelbot/update-apidiff-baseline-to-released-version-${VERSION}"
318-
319- git checkout -b $branch
320- git add docs/apidiffs
321- git commit -m "$message"
322- git push --set-upstream origin $branch
323- gh pr create --title "$message" \
324- --body "$body" \
325- --base main
0 commit comments