Skip to content

Commit a40592a

Browse files
Carson LamCarson Lam
authored andcommitted
2 parents 2c30f69 + 84f5146 commit a40592a

File tree

2 files changed

+16
-9
lines changed

2 files changed

+16
-9
lines changed

.github/workflows/upload-to-pypi.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
name: Upload to PyPI
2-
run-name: ${{ github.actor }} is uploading a new release of together python library client to PyPI 🚀
3-
on: [push]
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
PYPI_API_TOKEN:
7+
required: true
8+
description: your API token on PyPI
9+
410
jobs:
511
Upload-Library-to-PyPI:
612
runs-on: ubuntu-latest
713
steps:
814
- name: Check out repository code
9-
uses: actions/checkout
15+
uses: actions/checkout@v2
1016
- name: To build the dist archives into the dist/ directory, first install build
1117
run: |
1218
python3 -m pip install --upgrade build
@@ -16,11 +22,12 @@ jobs:
1622
- name: List files in the repository to check you have the .toml file
1723
run: |
1824
ls ${{ github.workspace }}
19-
- name: Use `python3 -m build` to build the dist archives run
25+
- 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
2026
run: |
2127
python3 -m build
22-
- name: You will see the `dist/` folder appear in the main directory of your repository
23-
- name: Use `python3 -m twine upload dist/*` to upload the archives to PyPI.
24-
run: |
25-
python3 -m twine upload dist/*
28+
- name: Publish distribution 📦 to PyPI
29+
if: startsWith(github.ref, 'refs/tags')
30+
uses: pypa/gh-action-pypi-publish@release/v1
31+
with:
32+
password: ${{ github.event.inputs.PYPI_API_TOKEN }}
2633

src/together/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION = "0.1.2"
1+
VERSION = "0.1.3"

0 commit comments

Comments
 (0)