Skip to content

Commit

Permalink
ci: Consolidate poetry workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
janw committed Jan 6, 2024
1 parent 5511ebc commit ccf67d9
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 33 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/poetry-build.yaml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/pypi-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Python Package

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')

publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
environment: release
needs: build
steps:
- name: Install poetry
run: pipx install poetry

- uses: actions/download-artifact@v4
with:
name: package

- run: ls dist/*

- name: Publish package
run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
17 changes: 0 additions & 17 deletions .github/workflows/pypi-publish.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.mp3
*.m4a
*.yaml
!.github/**/*.yaml

archive/
.ruff_cache/
Expand Down

0 comments on commit ccf67d9

Please sign in to comment.