Skip to content

Commit

Permalink
Publish
Browse files Browse the repository at this point in the history
  • Loading branch information
iurisilvio committed Feb 28, 2024
1 parent 6a6ed82 commit 6efcabd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install poetry tox tox-gh-actions
python -m pip install uv
python -m uv pip install tox tox-gh-actions
- name: Cache tox environments
id: cache-tox
uses: actions/cache@v3
Expand Down
33 changes: 14 additions & 19 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,24 @@
name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read
pull_request:
push:
branches:
- "*"
tags:
- "v*"

jobs:
deploy:

test-pypi-publish:
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/pytest-ruff
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: |
poetry install
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.15
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ __pycache__/

.coverage
coverage*.xml
poetry.lock

0 comments on commit 6efcabd

Please sign in to comment.