Bump to 1.0.4 #7
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: Pypi publishing | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
validate-gpg: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: git fetch --tags --unshallow --force | |
- name: Collect GPG keys | |
run: | | |
for key in ${{ secrets.VALID_KEY_URLS }}; do | |
curl $key | gpg --import || true | |
done | |
- name: Validate tag | |
run: | | |
git tag -v $(echo ${{ github.ref }} | sed 's/refs\/tags\///') | |
lint: | |
runs-on: ubuntu-latest | |
needs: validate-gpg | |
strategy: | |
matrix: | |
python-version: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
- name: Lint with pylint | |
run: | | |
pylint pylint_fixme_info | |
build: | |
runs-on: ubuntu-latest | |
needs: lint | |
env: | |
python-version: '3.9' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
if [ -f requirements-build.txt ]; then pip install -r requirements-build.txt; fi | |
- name: Run build | |
run: | | |
make build | |
- name: Upload built artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: dist/* | |
publish-test: | |
runs-on: ubuntu-latest | |
environment: Test Pypi | |
needs: | |
- build | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
- name: Publish distribution to Test PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
publish-prod: | |
runs-on: ubuntu-latest | |
environment: Prod Pypi | |
needs: | |
- build | |
- publish-test | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v2 | |
- name: Publish distribution to Test PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |