Skip to content

Commit

Permalink
Combine workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rytheranderson committed Dec 2, 2023
1 parent 9ecb292 commit 2485d00
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 46 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/pypi-publish.yml

This file was deleted.

35 changes: 34 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,37 @@ jobs:
- name: Install library
run: poetry install --no-interaction
- name: Test with tox
run: poetry run tox
run: poetry run tox

build-and-publish:
runs-on: ubuntu-latest
needs: test
environment:
name: pypi
url: https://pypi.org/p/pyfracgen
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Load cached poetry
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-0
- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
- name: Check pyproject.toml
run: poetry check --no-interaction
- name: Build
run: poetry build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true

0 comments on commit 2485d00

Please sign in to comment.