Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Numerical Action #213

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Automatically upload releases to PyPI
fdw authored and relma2 committed Mar 13, 2025
commit ec7f05bdc1952e6cf6dba80c903b73cf29581bf5
53 changes: 53 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Upload Python Package

on:
release:
types: [ published ]

permissions:
contents: read

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

steps:
- uses: actions/checkout@v4
- name: Set up Python and uv
uses: astral-sh/setup-uv@v5
with:
python-version: 3.13
enable-cache: true
cache-dependency-glob: "uv.lock"
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}

- name: Build a binary wheel and a source tarball
run: uv build

- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish to PyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/rofimoji
permissions:
id-token: write

steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/

- name: Publish distribution
uses: pypa/gh-action-pypi-publish@release/v1