forked from open-telemetry/opentelemetry-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish to PyPI via github action (open-telemetry#247)
- Loading branch information
Showing
4 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.7' | ||
- name: Build wheels | ||
run: ./scripts/build.sh | ||
- name: Publish to PyPI | ||
env: | ||
TWINE_USERNAME: '__token__' | ||
TWINE_PASSWORD: ${{ secrets.pypi_password }} | ||
run: | | ||
pip install twine | ||
twine upload --skip-existing --verbose dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/sh | ||
|
||
# This script builds wheels for the API, SDK, and extension packages in the | ||
# dist/ dir, to be uploaded to PyPI. | ||
|
||
set -ev | ||
|
||
# Get the latest versions of packaging tools | ||
python3 -m pip install --upgrade pip setuptools wheel | ||
|
||
BASEDIR=$(dirname $(readlink -f $(dirname $0))) | ||
|
||
( | ||
cd $BASEDIR | ||
mkdir -p dist | ||
rm -rf dist/* | ||
|
||
for d in opentelemetry-api/ opentelemetry-sdk/ ext/*/ ; do | ||
( | ||
cd "$d" | ||
python3 setup.py --verbose bdist_wheel --dist-dir "$BASEDIR/dist/" | ||
) | ||
done | ||
) |