Skip to content

Commit

Permalink
Add PyPI badge
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Dec 16, 2024
1 parent d3b1824 commit f5c500a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
38 changes: 31 additions & 7 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,40 @@
name: Python package
on:
# workflow_run:
# workflows: ["Testing"]
# branches: [main]
# types:
# - completed
workflow_dispatch:
push:
tags:
- "v*.*.*"
workflow_dispatch:

permissions:
contents: read

jobs:
build:
testing:
uses: ./.github/workflows/test.yml
pypi-publish:
name: Upload release to PyPI
needs:
- testing
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/yasfpy
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Build
run: uv build --no-sources

- name: Publish to PyPI
run: uv publish
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@
<img height="400" width="49%" src="docs/assets/img/yasf_black.svg#gh-light-mode-only">
</p>

[![PyPI version](https://badge.fury.io/py/yasfpy.svg)](https://badge.fury.io/py/yasfpy)
[![DOI](https://zenodo.org/badge/636196317.svg)](https://zenodo.org/doi/10.5281/zenodo.11193987)
[![License: MIT](https://img.shields.io/badge/License-MIT-success.svg)](https://opensource.org/licenses/MIT)
[![Unit tests](https://github.com/AGBV/YASF/actions/workflows/testing.yml/badge.svg)](https://github.com/AGBV/YASF/actions/workflows/testing.yml)
![Docs](https://github.com/AGBV/YASF/actions/workflows/mkdocs.yml/badge.svg)
![PYPI](https://github.com/AGBV/YASF/actions/workflows/pypi.yml/badge.svg)

[![codecov](https://codecov.io/gh/AGBV/YASF/graph/badge.svg?token=QUDBKGSDDB)](https://codecov.io/gh/AGBV/YASF)
[![DeepSource](https://app.deepsource.com/gh/AGBV/YASF.svg/?label=code+coverage&show_trend=true&token=qvVGCeQ5niqoLdaj12vk1hIU)](https://app.deepsource.com/gh/AGBV/YASF/)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/f4f8ef02c45748d9b2b477d7f29d219d)](https://app.codacy.com/gh/AGBV/YASF/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)

Expand Down

0 comments on commit f5c500a

Please sign in to comment.