-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (30 loc) · 790 Bytes
/
Copy pathpublish.yml
File metadata and controls
31 lines (30 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: publish
on:
push:
tags:
- v**
jobs:
pypi-publish:
name: Upload to PyPI
environment: release
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install tools
run: pip install poetry
- name: Build the release packages
run: |
poetry build
sha256sum dist/*
# only publish tagged commits to PyPI
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/v')
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true