Skip to content

CI: add a job for trusted publishing when pushing a tag #1

CI: add a job for trusted publishing when pushing a tag

CI: add a job for trusted publishing when pushing a tag #1

Workflow file for this run

# SPDX-FileCopyrightText: 2025 The meson-python developers
#
# SPDX-License-Identifier: MIT
name: Release
on:
push:
branches:
- main
- release-*
pull_request:
branches:
- main
- release-*
jobs:
build-artifacts:
name: Build sdist and wheel
runs-on: ubuntu-latest
- name: Checkout

Check failure on line 20 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

You have an error in your yaml syntax on line 20
uses: actions/checkout@v5
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.14
- name: Install pypa/build
run: |
python -m pip install build
- name: Run pypa/build
run: |
python -m build
- uses: actions/upload-artifact@v4
with:
path: ./dist/meson_python-*
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
environment:
name: pypi
url: https://pypi.org/p/meson-python
permissions:
id-token: write
steps:
- name: Download sdist and wheel
uses: actions/download-artifact@v5
with:
path: dist
merge-multiple: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true