Skip to content

Commit

Permalink
Fix release pypi actions workflow (#14)
Browse files Browse the repository at this point in the history
* cleaned actions

* test checks on push

* pypa/gh-action-pypi-publish

---------

Co-authored-by: Carson Lam <[email protected]>
  • Loading branch information
clam004 and Carson Lam authored Aug 11, 2023
1 parent 0f9025e commit 84f5146
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/upload-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: Upload to PyPI
run-name: ${{ github.actor }} is uploading a new release of together python library client to PyPI 🚀
on: [push]

on:
workflow_dispatch:
inputs:
PYPI_API_TOKEN:
required: true
description: your API token on PyPI

jobs:
Upload-Library-to-PyPI:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout
uses: actions/checkout@v2
- name: To build the dist archives into the dist/ directory, first install build
run: |
python3 -m pip install --upgrade build
Expand All @@ -16,11 +22,12 @@ jobs:
- name: List files in the repository to check you have the .toml file
run: |
ls ${{ github.workspace }}
- name: Use `python3 -m build` to build the dist archives run
- name: Use `python3 -m build` to build the dist archives run, You will see the `dist/` folder appear in the main directory of your repository
run: |
python3 -m build
- name: You will see the `dist/` folder appear in the main directory of your repository
- name: Use `python3 -m twine upload dist/*` to upload the archives to PyPI.
run: |
python3 -m twine upload dist/*
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ github.event.inputs.PYPI_API_TOKEN }}

2 changes: 1 addition & 1 deletion src/together/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = "0.1.2"
VERSION = "0.1.3"

0 comments on commit 84f5146

Please sign in to comment.