diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index ce2a3ce..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,28 +0,0 @@ -version: 2 -jobs: - pypi: - docker: - - image: circleci/python:3.6 - - steps: - - checkout - - - run: - name: Upload to PyPI - command: | - python3 -m venv venv - source venv/bin/activate - pip install twine wheel reno - python setup.py sdist bdist_wheel - twine upload dist/* - -workflows: - version: 2 - build_and_release: - jobs: - - pypi: - filters: - branches: - ignore: /.*/ - tags: - only: /^\d+\.\d+\.\d+$/ diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..202ec50 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,78 @@ +name: Create Release + +on: + push: + tags: + - 'v*' + +jobs: + build: + name: Build Release Objects + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel reno + + - name: Build and publish + run: | + python setup.py sdist bdist_wheel + + - uses: actions/upload-artifact@v2 + with: + name: dist + path: dist + if-no-files-found: error + + pypi: + name: Create Github Release + runs-on: ubuntu-latest + needs: build + steps: + - name: Get artifacts + uses: actions/download-artifact@v2 + with: + name: dist + path: dist + + - name: Create Release + id: create_release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # name: ${{ github.ref }} + # prerelease: true + # draft: true + files: | + dist/* + + release: + name: Push to PyPI + runs-on: ubuntu-latest + needs: build + steps: + - name: Get artifacts + uses: actions/download-artifact@v2 + with: + name: dist + path: dist + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + packages_dir: dist/ + password: ${{ secrets.PYPI_TOKEN }} + # password: ${{ secrets.TEST_PYPI_TOKEN }} + # repository_url: https://test.pypi.org/legacy/ diff --git a/requests_mock/py.typed b/requests_mock/py.typed deleted file mode 100644 index e69de29..0000000