Skip to content

Commit

Permalink
combine release and publish to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
cheginit committed Dec 7, 2020
1 parent cc916c9 commit cfdf3fd
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 29 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/python-publish.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
History
=======

0.1.4 (unreleased)
0.2.0 (2020-12-06)
------------------

- Add support for multipolygon.
Expand Down

0 comments on commit cfdf3fd

Please sign in to comment.