Skip to content

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #20

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows #20

Workflow file for this run

name: Release
on:
push:
pull_request:
jobs:
build:
name: Build wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install setuptools and wheel
run: pip install setuptools wheel
- name: Run bdist_wheel
run: python setup.py bdist_wheel --universal
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: wheel
path: dist/*.whl
test:
name: Run tests
needs: build
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Download wheel from artifacts
uses: actions/[email protected]
with:
name: wheel
- name: Install wheel
shell: bash
run: pip install *.whl
- name: Make it use package from wheel
shell: bash
run: rm flask_shell_ipython.py
- name: Install test requirements
run: pip install -r requirements-test.txt
- name: Test
if: runner.os != 'Windows'
run: pytest --forked
- name: Test (Windows)
if: runner.os == 'Windows'
shell: bash
run: pytest --collect-only -q | grep ^test_ | while read testname; do pytest -q $testname; done
pypi-publish:
name: Upload release to PyPI
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- name: Download artifacts
uses: actions/[email protected]
with:
name: wheel
path: dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1