Release v1.0.1 #13
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
name: Build and Upload Release | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
name: Build and Upload | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
pip install -r requirements.txt | |
- name: Build Package | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Upload to Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: dist/* | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract package version | |
run: | | |
VERSION=$(python3 -c "import pyclasher; print(pyclasher.__version__)") | |
echo "Package version: $VERSION" | |
echo "PACKAGE_VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Upload to test.pypi.org | |
run: python3 -m twine upload -u __token__ -p ${{ secrets.TEST_PYPI_TOKEN }} --repository testpypi --skip-existing dist/* | |
- name: Test of release | |
run: pip install -i https://test.pypi.org/simple/ pyclasher==$PACKAGE_VERSION | |
- name: Upload to pypi.org | |
run: python3 -m twine upload -u __token__ -p ${{ secrets.PYPI_TOKEN }} --repository pypi dist/* |