override wheel platform name to avoid caching #40 #14
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
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: "actions/checkout@v2" | |
- name: Get the version | |
id: version | |
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} | |
- name: Update version from tag | |
env: | |
VERSION: ${{ steps.version.outputs.VERSION }} | |
run: | | |
echo "Version is: ${VERSION}" | |
test -n "${VERSION}" | |
echo "__version__ = \"${VERSION}\"" > able/version.py | |
- name: Set up Python | |
uses: "actions/setup-python@v2" | |
with: | |
python-version: "3.7" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install wheel twine | |
- name: Build package | |
run: python setup.py sdist | |
- name: List result | |
run: ls -l dist | |
- name: Check distribution | |
run: python -m twine check dist/* | |
- name: Upload package to PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: twine upload dist/* |