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 208aa31
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 22 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/poetry-build.yaml

This file was deleted.

45 changes: 39 additions & 6 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,50 @@
name: PyPI Publish
name: PyPI Packaging

on:
push:
tags:
- "v*.*.*"
pull_request:

jobs:
poetry-publish:
build:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v3
- name: Check out
uses: actions/checkout@v4

- uses: JRubics/[email protected]
- name: Install poetry
run: pipx install poetry

- name: Build package
run: poetry build -vvv

- uses: actions/upload-artifact@v4
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
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 }}

0 comments on commit 208aa31

Please sign in to comment.