Skip to content

Bump crazy-max/ghaction-github-labeler from 5.0.0 to 5.1.0 #63

Bump crazy-max/ghaction-github-labeler from 5.0.0 to 5.1.0

Bump crazy-max/ghaction-github-labeler from 5.0.0 to 5.1.0 #63

Workflow file for this run

name: Build
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
hatch env create
- name: Lint and typecheck
run: |
hatch run lint-check
- name: Run Tests
run: |
hatch run test:pytest
release:
runs-on: ubuntu-latest
needs: test
environment: release
# if: startsWith(github.ref, 'refs/heads/main/')
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Build
run: |
hatch build
- name: Publish 📦 to Test PyPI
if: startsWith(github.ref, 'refs/heads/main')
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
user: __token__
password: ${{ secrets.TEST_PYPI_SECRECT }}
packages-dir: dist/
repository-url: https://test.pypi.org/legacy/
- name: Publish 📦 to PyPI
if: startsWith(github.ref, 'refs/heads/main')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_SECRECT }}
packages-dir: dist/
# - name: Create release
# uses: ncipollo/release-action@v1
# with:
# draft: true
# body: ${{ github.event.head_commit.message }}
# artifacts: dist/*.whl,dist/*.tar.gz
# token: ${{ secrets.GITHUB_TOKEN }}