Skip to content

chore(release): bump version to 1.27 #37

chore(release): bump version to 1.27

chore(release): bump version to 1.27 #37

Workflow file for this run

name: CI/CD
on:
push:
branches:
- main
tags:
- "v*.*"
pull_request:
branches:
- main
permissions:
contents: read
jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.15"
- "pypy3.10"
- "pypy3.11"
steps:
- name: Checkout
uses: actions/checkout@v7.0.0
- name: Set up uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --dev --frozen
- name: Run tests
run: uv run pytest tests
env:
PIXELDRAIN_API_KEY: ${{ secrets.PIXELDRAIN_API_KEY }}
MIXDROP_API_KEY: ${{ secrets.MIXDROP_API_KEY }}
lint-format:
name: Check linting and formatting
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v7.0.0
- name: Set up uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: "3.12"
- name: Uv lock check
run: uv lock --check
- name: Install dependencies
run: uv sync --dev --frozen
- name: Ruff lint & import check
run: uv run ruff check
- name: Ruff format check
run: uv run ruff format --check --diff
- name: Ty type check
run: uv run ty check
pypi-publish:
name: Publish package to PyPI
needs:
- unit-tests
- lint-format
if: github.ref_type == 'tag'
runs-on: ubuntu-24.04
environment:
name: pypi
url: https://pypi.org/project/lain-upload/
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v7.0.0
- name: Set up uv
uses: astral-sh/setup-uv@v8.2.0
with:
python-version: "3.12"
enable-cache: true
- name: Build package
run: uv build
- name: Upload package
uses: actions/upload-artifact@v7.0.0
with:
name: lain-upload
path: dist/*
- name: Publish package
run: uv publish
gh-release:
name: Create GitHub Release
needs: pypi-publish
if: github.ref_type == 'tag'
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v8.0.0
with:
path: release
merge-multiple: true
- name: Create release
uses: softprops/action-gh-release@v3.0.0
with:
tag_name: ${{ github.ref_name }}
name: lain-upload ${{ github.ref_name }}
generate_release_notes: true
files: |
release/**