Skip to content

Commit

Permalink
Testing publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
c24t committed Oct 29, 2019
1 parent 564a4cd commit 922fe71
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Publish
name: Publish (Testing)

on:
release:
types: [published]
on: [push, pull_request]

jobs:
publish:
Expand All @@ -15,7 +13,9 @@ jobs:
- name: Build wheels
run: ./scripts/build.sh
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@66f4ba7
with:
user: __token__
ACCESS_TOKEN: ${{ secrets.pypy_password }}
env:
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
pip install twine
twine check dist/*
21 changes: 14 additions & 7 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This script builds wheels for the API, SDK, and extension packages in the
# dist/ dir, to be uploaded to PyPI.

# set -ev
set -ev

# Get the latest versions of packaging tools
python3 -m pip install --upgrade pip setuptools wheel
Expand All @@ -13,12 +13,19 @@ BASEDIR=$(dirname $(readlink -f $(dirname $0)))
(
cd $BASEDIR
mkdir -p dist

# Clean old artifacts
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
# Clean old artifacts
for d in opentelemetry-api/ opentelemetry-sdk/ ext/*/ ; do
(
cd "$d"
echo "pwd"
echo $(pwd)
python3 setup.py bdist_wheel --dist-dir "$BASEDIR/dist/"
)
done
echo "built packages: "
ls -lah "$BASEDIR/dist/"
)

0 comments on commit 922fe71

Please sign in to comment.