Skip to content

[pre-commit.ci] pre-commit autoupdate #62

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #62

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Install pyproject-build
run: pipx install build
- name: Build dists
run: pyproject-build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist/*
publish:
name: Publish release
runs-on: ubuntu-22.04
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: build
permissions:
contents: write
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Make new release
run: >
gh release create ${{ github.ref_name }} \
--repo ${{ github.repository }} \
--generate-notes dist/*
env:
GH_TOKEN: ${{ github.token }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1