Skip to content
This repository was archived by the owner on Mar 22, 2025. It is now read-only.

Commit ccf67d9

Browse files
committed
ci: Consolidate poetry workflows
1 parent 5511ebc commit ccf67d9

File tree

4 files changed

+51
-33
lines changed

4 files changed

+51
-33
lines changed

.github/workflows/poetry-build.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/pypi-build.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Python Package
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out
14+
uses: actions/checkout@v4
15+
16+
- name: Install poetry
17+
run: pipx install poetry
18+
19+
- name: Build package
20+
run: poetry build -vvv
21+
22+
- uses: actions/upload-artifact@v4
23+
with:
24+
name: package
25+
path: |
26+
README.md
27+
pyproject.toml
28+
dist/*
29+
if-no-files-found: error
30+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
31+
32+
publish:
33+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
34+
runs-on: ubuntu-latest
35+
environment: release
36+
needs: build
37+
steps:
38+
- name: Install poetry
39+
run: pipx install poetry
40+
41+
- uses: actions/download-artifact@v4
42+
with:
43+
name: package
44+
45+
- run: ls dist/*
46+
47+
- name: Publish package
48+
run: poetry publish
49+
env:
50+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}

.github/workflows/pypi-publish.yaml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*.mp3
55
*.m4a
66
*.yaml
7+
!.github/**/*.yaml
78

89
archive/
910
.ruff_cache/

0 commit comments

Comments
 (0)