Skip to content

Commit

Permalink
Merge branch 'main' into pymysql-sqlcomment
Browse files Browse the repository at this point in the history
  • Loading branch information
tammy-baylis-swi authored Nov 19, 2024
2 parents 2759bd2 + 1c820ea commit ca54886
Show file tree
Hide file tree
Showing 77 changed files with 5,632 additions and 2,007 deletions.
4 changes: 4 additions & 0 deletions .github/component_owners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ components:
- karthikscale3
- lmolkova
- lzchen
- gyliu513
- nirga
- alizenhom
- codefromthecrypt
11 changes: 11 additions & 0 deletions .github/scripts/update-version-patch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash -e

sed -i "/\[stable\]/{n;s/version=.*/version=$1/}" eachdist.ini
sed -i "/\[prerelease\]/{n;s/version=.*/version=$2/}" eachdist.ini

./scripts/eachdist.py update_patch_versions \
--stable_version=$1 \
--unstable_version=$2 \
--stable_version_prev=$3 \
--unstable_version_prev=$4

4 changes: 2 additions & 2 deletions .github/workflows/package-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ jobs:
- name: Publish to PyPI
env:
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.test_pypi_token }}
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
twine upload --repository testpypi --skip-existing --verbose dist/*
twine upload --skip-existing --verbose dist/*
- name: Generate release notes
env:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/prepare-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,18 @@ jobs:
exit 1
fi
stable_version_prev="$stable_major_minor.$((stable_patch))"
unstable_version_prev="0.${unstable_minor}b$((unstable_patch))"
stable_version="$stable_major_minor.$((stable_patch + 1))"
unstable_version="0.${unstable_minor}b$((unstable_patch + 1))"
echo "STABLE_VERSION=$stable_version" >> $GITHUB_ENV
echo "UNSTABLE_VERSION=$unstable_version" >> $GITHUB_ENV
echo "STABLE_VERSION_PREV=$stable_version_prev" >> $GITHUB_ENV
echo "UNSTABLE_VERSION_PREV=$unstable_version_prev" >> $GITHUB_ENV
- name: Update version
run: .github/scripts/update-version.sh $STABLE_VERSION $UNSTABLE_VERSION
run: .github/scripts/update-version-patch.sh $STABLE_VERSION $UNSTABLE_VERSION $STABLE_VERSION_PREV $UNSTABLE_VERSION_PREV

- name: Set up Python 3.9
uses: actions/setup-python@v5
Expand Down
48 changes: 7 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,13 @@ jobs:
# rejected by pypi (e.g "3 - Beta"). This would cause a failure during the
# middle of the package upload causing the action to fail, and certain packages
# might have already been updated, this would be bad.
# EDIT: 5/31/2024 - TestPypi now requires a verified email. Commenting out as a temporary measure
# until we found TestPypi credentials.
# - name: Publish to TestPyPI
# env:
# TWINE_USERNAME: '__token__'
# TWINE_PASSWORD: ${{ secrets.test_pypi_token }}
# run: |
# twine upload --repository testpypi --skip-existing --verbose dist/*

- name: Publish to TestPyPI
env:
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.test_pypi_token }}
run: |
twine upload --repository testpypi --skip-existing --verbose dist/*
- name: Publish to PyPI
env:
Expand Down Expand Up @@ -119,36 +118,3 @@ jobs:
# the step below is creating a pull request against main
ref: main

- name: Copy change log updates to main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "VERSION=${STABLE_VERSION}\/${UNSTABLE_VERSION}" >> $GITHUB_ENV
echo "RELEASE_TAG=$STABLE_VERSION" >> $GITHUB_ENV
./scripts/merge_changelog_to_main.sh
- name: Use CLA approved github bot
run: .github/scripts/use-cla-approved-github-bot.sh

- name: Create pull request against main
env:
# not using secrets.GITHUB_TOKEN since pull requests from that token do not run workflows
GITHUB_TOKEN: ${{ secrets.OPENTELEMETRYBOT_GITHUB_TOKEN }}
run: |
message="Copy change log updates from $GITHUB_REF_NAME"
body="Copy log updates from \`$GITHUB_REF_NAME\`."
branch="opentelemetrybot/copy-change-log-updates-from-${GITHUB_REF_NAME//\//-}"
if [[ -z $PRIOR_VERSION_WHEN_PATCH ]]; then
if git diff --quiet; then
echo there are no updates needed to the change log on main, not creating pull request
exit 0 # success
fi
fi
git commit -a -m "$message"
git push origin HEAD:$branch
gh pr create --title "$message" \
--body "$body" \
--head $branch \
--base main
Loading

0 comments on commit ca54886

Please sign in to comment.