Skip to content

Use pypi trusted publishing (#28) #5

Use pypi trusted publishing (#28)

Use pypi trusted publishing (#28) #5

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
jobs:
build-and-publish:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install build dependencies
run: pip install -U setuptools wheel build
- name: Set package version
run: |
VERSION="${GITHUB_REF#refs/*/}"
sed -i"" -e "s/^PACKAGE_VERSION = .*/PACKAGE_VERSION = \"${VERSION}\"/g" ./setup.py
- name: Build
run: python -m build .
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true