46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*.*.*'
|
|
pull_request:
|
|
tags:
|
|
- 'v*.*.*'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Python 3.12
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
- name: Install Dependencies
|
|
run: pip install ".[dev]"
|
|
- name: Build on Python 3.12
|
|
run: hatch build
|
|
- name: Store the distribution packages
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: python-package-distributions
|
|
path: dist/
|
|
publish-to-pypi:
|
|
needs:
|
|
- build
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: pypi
|
|
url: https://pypi.org/p/html_to_django
|
|
permissions:
|
|
id-token: write
|
|
steps:
|
|
- name: Download all the dists
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: python-package-distributions
|
|
path: dist/
|
|
- name: Publish distribution to PyPI
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|