Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/scripts/generate-release-contributors.sh
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ echo $contributors1 $contributors2 \
| sort -uf \
| grep -v linux-foundation-easycla \
| grep -v github-actions \
| grep -v dependabot \
| grep -v renovate \
| grep -v otelbot \
| grep -v codecov \
| grep -v opentelemetrybot \
| sed 's/^/@/'
4 changes: 2 additions & 2 deletions .github/scripts/use-cla-approved-github-bot.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash -e

git config user.name opentelemetrybot
git config user.email 107717825+opentelemetrybot@users.noreply.github.com
git config user.name otelbot
git config user.email 197425009+otelbot@users.noreply.github.com
73 changes: 0 additions & 73 deletions .github/workflows/generate-post-release-pr.yml

This file was deleted.

20 changes: 16 additions & 4 deletions .github/workflows/prepare-release-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,19 @@ jobs:
- name: Use CLA approved github bot
run: .github/scripts/use-cla-approved-github-bot.sh

- uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}

- name: Create pull request against the release branch
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
message="Prepare release $VERSION"
branch="opentelemetrybot/prepare-release-${VERSION}"
branch="otelbot/prepare-release-${VERSION}"

git checkout -b $branch
git commit -a -m "$message"
Expand Down Expand Up @@ -105,14 +111,20 @@ jobs:
- name: Use CLA approved github bot
run: .github/scripts/use-cla-approved-github-bot.sh

- uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}

- name: Create pull request against main
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
message="Update changelog for $VERSION release"
body="Update changelog for \`$VERSION\` release."
branch="opentelemetrybot/update-version-to-${VERSION}"
branch="otelbot/update-version-to-${VERSION}"

git checkout -b $branch
git commit -a -m "$message"
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.create-github-release.outputs.version }}
prior-version: ${{ steps.create-github-release.outputs.prior-version }}
steps:
- run: |
if [[ $GITHUB_REF_NAME != release/* ]]; then
Expand Down Expand Up @@ -114,4 +115,86 @@ jobs:
--notes-file /tmp/release-notes.txt \
v$VERSION

# these are used as job outputs
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "prior-version=$PRIOR_VERSION" >> $GITHUB_OUTPUT

update-apidiff-baseline-to-released-version:
permissions:
contents: write # for git push to PR branch
runs-on: ubuntu-latest
needs:
- release
steps:
# add change log sync (if any) into this PR since the apidiff update
# is required before any other PR can be merged anyway
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Copy change log section from release branch
env:
VERSION: ${{ needs.release.outputs.version }}
run: |
sed -n "0,/^## Version $VERSION /d;/^## Version /q;p" CHANGELOG.md \
> /tmp/changelog-section.md

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: main

- name: Merge change log to main
env:
VERSION: ${{ needs.release.outputs.version }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
release_date=$(gh release view v$VERSION --json publishedAt --jq .publishedAt | sed 's/T.*//')
RELEASE_DATE=$release_date .github/scripts/merge-change-log-after-release.sh
git add CHANGELOG.md

- name: Wait for release to be available in maven central
env:
VERSION: ${{ needs.release.outputs.version }}
run: |
until curl --silent \
--show-error \
--output /dev/null \
--head \
--fail \
https://repo1.maven.org/maven2/io/opentelemetry/semconv/opentelemetry-semconv/$VERSION/opentelemetry-semconv-$VERSION.jar
do
sleep 60
done

- name: Update apidiff baseline
env:
VERSION: ${{ needs.release.outputs.version }}
PRIOR_VERSION: ${{ needs.release.outputs.prior-version }}
run: |
./gradlew japicmp -PapiBaseVersion=$PRIOR_VERSION -PapiNewVersion=$VERSION
./gradlew --refresh-dependencies japicmp
git add docs/apidiffs

- name: Use CLA approved bot
run: .github/scripts/use-cla-approved-bot.sh

- uses: actions/create-github-app-token@21cfef2b496dd8ef5b904c159339626a10ad380e # v1.11.6
id: otelbot-token
with:
app-id: ${{ vars.OTELBOT_APP_ID }}
private-key: ${{ secrets.OTELBOT_PRIVATE_KEY }}

- name: Create pull request against main
env:
VERSION: ${{ needs.release.outputs.version }}
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GH_TOKEN: ${{ steps.otelbot-token.outputs.token }}
run: |
message="Update apidiff baseline to released version $VERSION"
body="Update apidiff baseline to released version \`$VERSION\`."
branch="otelbot/update-apidiff-baseline-to-released-version-${VERSION}"

git checkout -b $branch
git commit -m "$message"
git push --set-upstream origin $branch
gh pr create --title "$message" \
--body "$body" \
--base main
Loading