Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafnuss committed Jan 19, 2025
2 parents 62250d2 + d7064bc commit ff907d6
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 1 deletion.
74 changes: 74 additions & 0 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI

on: push

jobs:
build:
name: Build distribution 📦
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/e2L # Replace <package-name> with your PyPI project name
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/e2L

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# eBird2LaTeX

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Zoziologie/ebird2latex/blob/master/script_e2L.ipynb)
[![PyPI version](https://img.shields.io/pypi/v/e2L.svg)](https://pypi.org/project/e2L/) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/Zoziologie/ebird2latex/blob/master/script_e2L.ipynb)

eBird2LaTeX is a Python module which generates a customisable bird checklist based on [eBird barchart data](https://ebird.org/GuideMe?cmd=changeLocation).

Expand Down Expand Up @@ -46,3 +46,5 @@ You'll need to add your credidential of eBird in a new `auth.json` file:
- eBird login to download barchart data and your target

## Example

[See the example folder.](https://github.com/Zoziologie/ebird2latex/tree/master/example)

0 comments on commit ff907d6

Please sign in to comment.