Merge pull request #256 from FunkeCoder23/update-contrib-guide #39
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: Upload to Test PyPI | |
# On every push to main, push to Test PyPI | |
on: | |
push: | |
branches: | |
- main | |
# TODO: De-duplicate with python-publish-release.yml | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches | |
- name: Unshallow checkout | |
run: git fetch --prune --unshallow | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install build twine | |
sudo apt-get update | |
sudo apt-get install -y musl-tools | |
- name: Build | |
env: | |
CC: /usr/bin/musl-gcc | |
CI_VERSION_BUILD_NUMBER: ${{ github.run_id }} | |
run: python -m build | |
- name: Publish | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_TEST_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_PASSWORD }} | |
run: twine upload --repository-url https://test.pypi.org/legacy/ dist/* |