diff --git a/.github/workflows/build-win-mac.yml b/.github/workflows/build-win-mac.yml new file mode 100644 index 0000000..43c43b2 --- /dev/null +++ b/.github/workflows/build-win-mac.yml @@ -0,0 +1,72 @@ +name: Build and Publish Mac and Windows + +on: + push: + branches: + - main + pull_request: + types: + - closed + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [windows-latest, macos-latest] + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install cibuildwheel + run: | + python -m pip install cibuildwheel + - name: Build wheel + run: | + python -m cibuildwheel --output-dir wheelhouse + env: + CIBW_BUILD: cp38-* + + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: wheels-${{ matrix.os }} + path: ./wheelhouse/*.whl + + upload_wheels: + needs: build_wheels + runs-on: ubuntu-latest + if: github.event.pull_request.merged == true || github.ref == 'refs/heads/main' + steps: + - name: Download wheels + uses: actions/download-artifact@v2 + with: + name: wheels-windows-latest + path: dist/ + - name: Download wheels + uses: actions/download-artifact@v2 + with: + name: wheels-macos-latest + path: dist/ + + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install twine + run: python -m pip install twine + + - name: Publish wheels to PyPI + run: | + twine upload --skip-existing --repository-url https://upload.pypi.org/legacy/ dist/*.whl + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae57243..dba58ad 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,7 @@ jobs: - name: Build sdist run: | + pip install wheel python setup.py sdist mkdir -p dists mv dist/*.tar.gz dists/ diff --git a/setup.py b/setup.py index 7bae3ed..73611c2 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ def run(self): setup( name="azpype", - version="0.3.7a8", + version="0.3.8", description="A native Python interface wrapping AzCopy for bulk data transfer to and from Azure Blob Storage.", long_description=open('README.md', encoding="UTF-8").read(), long_description_content_type='text/markdown',