Skip to content

Bump ncipollo/release-action from 1.13.0 to 1.14.0 #136

Bump ncipollo/release-action from 1.13.0 to 1.14.0

Bump ncipollo/release-action from 1.13.0 to 1.14.0 #136

Workflow file for this run

name: πŸ§ͺ Tests
on:
push:
tags: "*"
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
name: "🎳 Tests"
runs-on: ubuntu-latest
strategy:
matrix:
python: [
"3.8",
"3.9",
"3.10",
]
steps:
- name: Get source code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- uses: actions/cache@v4.0.1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Python requirements
run: |
python -m pip install -U pip setuptools wheel
pip install -r requirements.txt
- name: Run tests
working-directory: tests
run: |
export PYTHONPATH="${{ github.workspace }}"
python -m unittest
release:
name: "πŸš€ Release"
runs-on: ubuntu-20.04
needs: [tests]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Get source code
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Setup
run: |
VERSION=${GITHUB_REF:-0.0.0}
VERSION=${VERSION##*/}
sed -i "s/__VERSION__/${VERSION}/g" setup.py
sed -i "s/__VERSION__/${VERSION}/g" qgis_plugin_repo/__about__.py
- name: Build package
run: |
python setup.py sdist
- name: Create release on GitHub
uses: ncipollo/release-action@v1.14.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
allowUpdates: true
artifacts: "dist/*.tar.gz"
- name: Deploy to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}