diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml deleted file mode 100644 index a5eef7e..0000000 --- a/.github/workflows/python-publish.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: pypi publish - -on: - release: - types: [created] - -jobs: - deploy: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - name: Set up Python - uses: actions/setup-python@master - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - python setup.py sdist bdist_wheel - twine upload dist/* diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5f37a48 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,48 @@ +on: + push: + tags: + - 'v*' + +name: Release and publish + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + Please check [HISTORY.rst](HISTORY.rst) file for a detailed list + of changes. + draft: false + prerelease: true + + - name: Set up Python + uses: actions/setup-python@master + with: + python-version: 3.8 + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel + + - name: Build dist and wheel + run: | + python setup.py sdist bdist_wheel + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.PYPI_PASSWORD }} diff --git a/HISTORY.rst b/HISTORY.rst index 712b1a1..2c6bdf8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -2,7 +2,7 @@ History ======= -0.1.4 (unreleased) +0.2.0 (2020-12-06) ------------------ - Add support for multipolygon.