Skip to content

Commit

Permalink
Update conda package upload action.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Dec 4, 2023
1 parent 05c3f08 commit d851dc3
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
40 changes: 21 additions & 19 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PyPI and Conda Publish
name: Publish Python Package to PyPI and Conda

on:
push:
Expand All @@ -19,33 +19,35 @@ jobs:
with:
python-version: '3.x'

- name: Install Python dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
pip install build
pip install twine
pip install anaconda-client
- name: Build and Publish to PyPI
run: |
python -m build
python -m twine upload --skip-existing dist/*
- name: Build package
run: python -m build

- name: Publish package to PyPI
run: python -m twine upload --skip-existing dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

- name: Install Conda Build and Anaconda Client
run: |
sudo apt-get update
sudo apt-get install -y wget
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda
export PATH="$HOME/miniconda/bin:$PATH"
conda install -y conda-build
conda install -y anaconda-client
# Additional steps for Conda
- name: Install Conda Build
run: conda install conda-build

- name: Build Conda package
run: conda-build .
run: conda build .

- name: Upload Conda package
run: anaconda upload --user [YourAnacondaUsername] $HOME/miniconda/conda-bld/[platform]/[package-name]-[version].tar.bz2
- name: Convert Conda package for other platforms (optional)
run: |
conda convert --platform all $HOME/miniconda/conda-bld/linux-64/*.tar.bz2 -o $HOME/miniconda/conda-bld/
- name: Publish package to Anaconda
run: |
anaconda upload $HOME/miniconda/conda-bld/*/*.tar.bz2
env:
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "readmeai"
version = "0.4.058"
version = "0.4.059"
description = "🚀 Generate beautiful README files from the terminal, powered by OpenAI's GPT language models 💫"
authors = ["Eli <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit d851dc3

Please sign in to comment.