Skip to content

build: migrate to pyproject.toml #25

build: migrate to pyproject.toml

build: migrate to pyproject.toml #25

Workflow file for this run

# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
# SPDX-FileCopyrightText: 2021 James Carr
#
# SPDX-License-Identifier: MIT
name: Release Actions
on:
pull_request:
branches: [main]
push:
branches: [main]
release:
types: [published]
permissions: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
filter: 'blob:none'
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Build
run: pipx run build
- name: Check dist metadata
run: pipx run twine check dist/*
- name: Upload build as artifacts
uses: actions/upload-artifact@v5
with:
name: dist
path: dist/*
publish:
if: github.event_name == 'release' && startsWith(github.repository_owner, 'adafruit')
needs: [build]
runs-on: ubuntu-latest
permissions:
# needed for authenticating with PyPI trusted publisher
id-token: write
steps:
- name: Download build artifacts
uses: actions/download-artifact@v6
with:
name: dist
path: ./dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0