Skip to content

Bump pypa/gh-action-pypi-publish from 1.10.2 to 1.11.0 in the all gro… #27

Bump pypa/gh-action-pypi-publish from 1.10.2 to 1.11.0 in the all gro…

Bump pypa/gh-action-pypi-publish from 1.10.2 to 1.11.0 in the all gro… #27

Workflow file for this run

name: build
on:
push:
tags:
- v*
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
build:
name: Build artifacts
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Hatch
uses: pypa/hatch@install
- name: Build wheel and source distribution
run: hatch build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts
path: dist/*
if-no-files-found: error
publish:
name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
needs: build
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download Python artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: dist
- name: Push Python artifacts to PyPI
uses: pypa/[email protected]
with:
skip-existing: true