-
-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (39 loc) · 1 KB
/
publish.yaml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Publish
on:
push:
tags:
- "v*.*.*"
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Build package
run: poetry build -vvv
- uses: actions/upload-artifact@v4
with:
name: package
path: |
README.md
pyproject.toml
dist/*
if-no-files-found: error
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
pypi:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
needs: build
steps:
- uses: actions/download-artifact@v4
with:
name: package
- run: ls dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1 # cspell: disable-line