Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
endomorphosis committed Jul 24, 2024
1 parent 2216ff3 commit 6288f5e
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 72 deletions.
72 changes: 0 additions & 72 deletions .github/workflows/publish_to_pipy.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Publish Python Package

on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
release:
types: [created]

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

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: python -m pip install --upgrade pip setuptools wheel
- name: Build the package
run: python setup.py sdist bdist_wheel
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish Python 🐍 distribution 📦 to PyPI
if: github.ref == 'refs/heads/main' # only publish to PyPI on pushes to main branch
needs: build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/ipfs-transformers # 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@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ build
ipfs_transformers.egg-info
config/config.toml
config.toml
dist
21 changes: 21 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "ipfs_transformers"
version = "0.0.1"
authors = [
{ name="Benjamin Barber", email="[email protected]" },
]
description = "A wrapper around huggingface transformers, invoking an IPFS model manager."
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Operating System :: POSIX :: Linux",
]
[project.urls]
Homepage = "https://github.com/endomorphosis/ipfs_transformers"
Issues = "https://github.com/endomorphosis/ipfs_transformers/issues"

0 comments on commit 6288f5e

Please sign in to comment.