Skip to content

Commit

Permalink
disable broken auto publish
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrunel committed May 16, 2024
1 parent 1e8c6ee commit 24c7ca5
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,46 @@
name: Publish Sub-Packages to PyPI if Needed
# name: Publish Sub-Packages to PyPI if Needed

on:
push:
branches:
- main
# on:
# push:
# branches:
# - main

env:
POETRY_VERSION: "1.6.1"
PYTHON_VERSION: "3.10"
# env:
# POETRY_VERSION: "1.6.1"
# PYTHON_VERSION: "3.10"

jobs:
publish_packages_if_needed:
if: github.repository == 'lavague-ai/lavague'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
- name: Get changed pyproject files
id: changed-files
run: |
echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep -v lavague-core | grep lavague | grep pyproject | xargs)" >> $GITHUB_OUTPUT
- name: Publish changed packages
env:
PYPI_TOKEN: ${{ secrets.LAVAGUE_PYPI_TOKEN }}
run: |
for file in ${{ steps.changed-files.outputs.changed_files }}; do
cd `echo $file | sed 's/\/pyproject.toml//g'`
poetry lock
pip install -e .
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
cd -
done
# jobs:
# publish_packages_if_needed:
# if: github.repository == 'lavague-ai/lavague'
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0
# - name: Set up python ${{ env.PYTHON_VERSION }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ env.PYTHON_VERSION }}
# - name: Install Poetry
# uses: snok/install-poetry@v1
# with:
# version: ${{ env.POETRY_VERSION }}
# - name: Get changed pyproject files
# id: changed-files
# run: |
# echo "changed_files=$(git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | grep -v lavague-core | grep lavague | grep pyproject | xargs)" >> $GITHUB_OUTPUT
# - name: Publish changed packages
# env:
# PYPI_TOKEN: ${{ secrets.LAVAGUE_PYPI_TOKEN }}
# run: |
# for file in ${{ steps.changed-files.outputs.changed_files }}; do
# cd `echo $file | sed 's/\/pyproject.toml//g'`
# poetry lock
# pip install -e .
# poetry config pypi-token.pypi $PYPI_TOKEN
# poetry publish --build
# cd -
# done

# check-docs-with-new-package:
# runs-on: ubuntu-latest
Expand Down

0 comments on commit 24c7ca5

Please sign in to comment.