Skip to content

release: 1.0a7

release: 1.0a7 #8

Workflow file for this run

name: Release
on:
push:
tags:
- "v*.*"
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.5.4"
- name: Install test deps
run: uv sync --group test --no-dev
- name: Run pytest
run: uv run --no-sync pytest
pypi-publish:
name: PYPI publish
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/htmst
needs: [test]
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: python -m pip install setuptools wheel twine
- name: Build distributions
run: python setup.py sdist bdist_wheel
- name: Test distributions
run: twine check dist/*
- name: Upload distributions
run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
github-release:
name: Github release
runs-on: ubuntu-latest
permissions:
contents: write
needs: [pypi-publish]
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Get latest tag
id: get-latest-tag
run: |
git fetch --tags --force
latest_tag=$(git tag -l --sort=-version:refname | head -n 1)
echo "latest-tag=$latest_tag" >> $GITHUB_OUTPUT
- name: Create release
uses: ncipollo/release-action@v1
with:
name: ${{ steps.get-latest-tag.outputs.latest-tag }}
tag: ${{ steps.get-latest-tag.outputs.latest-tag }}
token: ${{ secrets.GITHUB_TOKEN }}