feat(#16): Use taskfile to automate scripts. Aditionally: #13
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: Master Deploy | |
on: | |
push: | |
branches: | |
- "master" | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
- name: Install Task | |
uses: arduino/setup-task@v2 | |
with: | |
version: 3.37.1 | |
- name: Install dependencies and test | |
run: | | |
task setup | |
venv/bin/poetry run pre-commit uninstall | |
task test | |
- name: Generate Documentation | |
run: | | |
task docs | |
- name: Version Bump | |
run: | | |
task bump | |
git push | |
git push origin v$(task version) | |
- name: Build package and publish | |
env: | |
PYPI_KEY: ${{ secrets.PYPI_KEY }} | |
run: | | |
task publish | |
- name: Publish Release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
REPO_NAME: ${{ github.repository }} | |
TAG: $(task version) | |
run: gh release create "$TAG" --repo="$REPO_NAME" --title="$TAG" --generate-notes |