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

new workflows file #2

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 36 additions & 18 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,39 @@
name: Publish to PyPI
on:
release:
types: [published]
name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI

on: push

jobs:
pypi_release:
name: Builds Using Poetry and Publishes to PyPI
runs-on: ubuntu-latest
environment: pypi
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install deps
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install --with dev
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_API_KEY }}"
- name: Publish package
run: poetry publish --build
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
.
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.TEST_PYPI_API_KEY }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_KEY }}
22 changes: 0 additions & 22 deletions .github/workflows/testpypi.yml

This file was deleted.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[tool.poetry]
name = "unifyai"
version = "0.1.0"
readme = "README.md"
description = "A Python package for interacting with the Unify API"
authors = ["Unify <[email protected]>"]
repository = "https://github.com/unifyai/unify-llm-python"

[tool.poetry.dependencies]
python = "^3.9"
Expand Down
Loading