Skip to content

Commit

Permalink
new workflows file
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-fri-end committed Apr 1, 2024
1 parent 9d7c653 commit ce672fa
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 40 deletions.
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 <hello@unify.com>"]
repository = "https://github.com/unifyai/unify-llm-python"

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

0 comments on commit ce672fa

Please sign in to comment.