Bump version #117
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will create a pypi package and upload it with twine | |
name: Build | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
if [ -f requirements-build.txt ]; then pip install -r requirements-build.txt; fi | |
- name: Set Environment | |
env: | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' | |
run: | | |
raw=$(git branch -r --contains ${{ github.ref }}) | |
branch=${raw/origin\/} | |
echo $branch | |
echo "::set-env name=BRANCH_NAME::$branch" | |
- name: Build | |
run: | | |
pip install wheel | |
python ./setup.py sdist bdist_wheel | |
- name: Upload | |
if: github.event.base_ref == 'refs/heads/master' && ${{ env.BRANCH_NAME == 'master' }} | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} |