Skip to content

[github-actions] upgrade release.yml to work on tags #10

[github-actions] upgrade release.yml to work on tags

[github-actions] upgrade release.yml to work on tags #10

Workflow file for this run

name: Build package and deploy on PyPi
on:
push:
branches:
- master
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel
run: >-
python3 -m
build
--wheel
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1