Skip to content

Bump actions/checkout from 3 to 4 #215

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #215

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.7",
"3.8",
"3.9",
"3.10",
"3.11",
]
steps:
- name: Get source code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Upgrade PIP
run: pip install --upgrade pip
- name: Run tests
working-directory: test
run: |
export PYTHONPATH="${{ github.workspace }}"
python -m unittest
flake8:
name: "❄ Flake8"
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Upgrade PIP
run: pip install --upgrade pip
- name: Checkout
uses: actions/checkout@v4
- name: Install Python requirements
run: pip install flake8
- name: Run flake8
run: flake8
release:
name: "πŸš€ Release"
runs-on: ubuntu-20.04
needs: [tests, flake8]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Get source code
uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Upgrade PIP
run: pip install --upgrade pip
- 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_manager/__about__.py
- name: Read the changelog
id: changelog
uses: 3liz/[email protected]
- name: Build package
run: |
python setup.py sdist
- name: Create release on GitHub
uses: ncipollo/[email protected]
with:
body: ${{ steps.changelog.outputs.markdown }}
token: ${{ secrets.BOT_HUB_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 }}
- name: Tweet
uses: mugi111/[email protected]
with:
consumer_key: ${{ secrets.TWITTER_CONSUMER_KEY }}
consumer_secret: ${{ secrets.TWITTER_CONSUMER_SECRET }}
access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
access_token_secret: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
tweet_body: "QGIS-Plugin-Manager ${{ env.RELEASE_VERSION }} 🧩 #CLI #QGIS https://github.com/3liz/qgis-plugin-manager/releases"