Skip to content

Bump hatch

Bump hatch #193

Workflow file for this run

name: Build
on:
push:
workflow_dispatch:
inputs:
publish:
description: "Publish to PyPI?"
required: true
default: false
type: boolean
tag:
description: "Tag to use for release"
required: true
jobs:
build:
name: Build wheel and sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.inputs.tag || github.ref }}
- uses: hynek/build-and-inspect-python-package@v1
publish:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/') || github.event.inputs.publish == 'true'
runs-on: ubuntu-latest
needs: [build]
environment:
name: pypi
url: https://pypi.org/p/citric
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v3
with:
name: Packages
path: dist
- uses: pypa/[email protected]
# Move this up when PyPI supports signing
sign:
name: Sign the distribution package
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: [build]
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
steps:
- uses: actions/download-artifact@v3
with:
name: Packages
path: dist
- uses: sigstore/[email protected]
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- uses: svenstaro/upload-release-action@v2
with:
file: dist/**
tag: ${{ github.event.inputs.tag || github.ref }}
overwrite: false
file_glob: true