support alternative naming patterns in pytest #90
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: Upload Python Package | |
on: | |
release: | |
types: [ created ] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- 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 setuptools wheel twine | |
- name: Determine version from git tag | |
id: version | |
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} | |
- name: set version | |
run: | | |
rm ./version.py | |
echo version_number = \"${{ steps.version.outputs.tag }}\" > ./version.py | |
cp ./version.py ./approvaltests/version.py | |
- name: Push changes | |
run: | | |
git config --local user.email "action@github.com" | |
git config --local user.name "GitHub Action" | |
git commit -m "${{ steps.version.outputs.tag }}" -a || echo "nothing to commit" | |
git checkout -b temp | |
git fetch | |
git checkout main | |
git merge temp | |
remote="https://${GITHUB_ACTOR}:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}.git" | |
branch="main" | |
git push "${remote}" ${branch} || echo "nothing to push" | |
shell: bash | |
- name: Build and publish approval_utilities | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_APPROVAL_UTILITIES }} | |
run: | | |
./publish_approval_utilities.sh | |
- name: Build and publish approvaltests | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python setup.publish.py sdist bdist_wheel | |
twine upload --repository-url https://upload.pypi.org/legacy/ dist/* | |
rm -r dist | |
- name: Build and publish minimal | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_APPROVALTESTS_MINIMAL }} | |
run: | | |
python setup.minimal.py sdist bdist_wheel | |
twine upload --repository-url https://upload.pypi.org/legacy/ dist/* | |
rm -r dist | |