Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
pavi committed Jul 21, 2024
1 parent 922df41 commit d9f9f4b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,33 @@ jobs:
run: |
if git diff --name-only HEAD^ HEAD | grep -q "setup.py"; then
echo "setup.py changed"
echo "::set-output name=changed::true"
echo "changed=true" >> $GITHUB_ENV
else
echo "setup.py not changed"
echo "::set-output name=changed::false"
echo "changed=false" >> $GITHUB_ENV
fi
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
if: steps.check_setup.outputs.changed == 'true'
if: env.changed == 'true'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
if: steps.check_setup.outputs.changed == 'true'
if: env.changed == 'true'

- name: Build package
run: |
python setup.py sdist bdist_wheel
if: steps.check_setup.outputs.changed == 'true'
if: env.changed == 'true'

- name: Publish package
env:
TWINE_USERNAME: _token_
TWINE_PASSWORD: ${{ secrets.token }}
run: |
twine upload dist/*
if: steps.check_setup.outputs.changed == 'true'
if: env.changed == 'true'

0 comments on commit d9f9f4b

Please sign in to comment.