Skip to content

adjust configs

adjust configs #14

Workflow file for this run

name: Test
on: [push, pull_request]
concurrency:
group: cicd-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test on Linux64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install poetry
run: pipx install poetry==1.3.2
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "poetry"
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install \
libgirepository1.0-dev \
libcairo2-dev \
python3-gi \
gobject-introspection \
libgtk-4-dev
- name: Poetry install
run: poetry install
- name: Ruff
run: poetry run ruff check .
- name: Black
run: poetry run black --check .
- name: Mypy
run: poetry run mypy
- name: Pytest
run: poetry run pytest
- name: Test AppImage build
run: poetry run make clean-build
publish:
name: Build & Publish
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install poetry
run: pipx install poetry==1.3.2
- uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "poetry"
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install \
libgirepository1.0-dev \
libcairo2-dev \
python3-gi \
gobject-introspection \
libgtk-4-dev
- name: Poetry install
run: poetry install
# Prepare Release
- name: Build AppImage
run: poetry run make clean-build
- name: Draft release
uses: softprops/action-gh-release@v1
with:
files: |
*.AppImage
body:
See [CHANGELOG](https://github.com/dynobo/keyhint/blob/main/CHANGELOG.md)
for details.
draft: true
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Publish to PyPi
- name: Build and publish to PyPi
run: |
poetry publish \
--build \
--username __token__ \
--password ${{ secrets.PYPI_KEYHINT_TOKEN }}