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

This file was deleted.

44 changes: 39 additions & 5 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,48 @@ on:
push:
tags:
- "v*.*.*"
pull_request:

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

- name: Install poetry
run: pipx install poetry

- name: Build package
run: poetry build

- uses: actions/upload-artifact@v4
with:
name: pypi-package
path: dist/*
if-no-files-found: error
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

- uses: JRubics/[email protected]
pypi-test:
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
name: pypi-package

- run: ls dist/*


pypi-publish:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/download-artifact@v4
with:
name: pypi-package

- name: Publish package
run: poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

0 comments on commit 514a29d

Please sign in to comment.