Skip to content

Commit

Permalink
no pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
Neradoc committed Feb 24, 2023
1 parent 7c6eb35 commit d9fdcfc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ jobs:
# - name: Build docs
# working-directory: docs
# run: sphinx-build -E -W -b html . _build/html
- name: Check For pyproject.toml
id: need-pypi
run: |
echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
- name: Build Python package
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
run: |
pip install --upgrade build twine
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
sed -i -e "s/0.0.0+auto.0/1.2.3/" $file;
done;
python -m build
twine check dist/*
# - name: Check For pyproject.toml
# id: need-pypi
# run: |
# echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
# - name: Build Python package
# if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
# run: |
# pip install --upgrade build twine
# for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
# sed -i -e "s/0.0.0+auto.0/1.2.3/" $file;
# done;
# python -m build
# twine check dist/*
58 changes: 29 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,32 +57,32 @@ jobs:
pattern: "bundles/*"
github-token: ${{ secrets.GITHUB_TOKEN }}

upload-pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Check For pyproject.toml
id: need-pypi
run: |
echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
- name: Set up Python
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
run: |
python -m pip install --upgrade pip
pip install --upgrade build twine
- name: Build and publish
if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
env:
TWINE_USERNAME: ${{ secrets.pypi_username }}
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file;
done;
python -m build
twine upload dist/*
# upload-pypi:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - name: Check For pyproject.toml
# id: need-pypi
# run: |
# echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' )
# - name: Set up Python
# if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
# uses: actions/setup-python@v2
# with:
# python-version: '3.x'
# - name: Install dependencies
# if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
# run: |
# python -m pip install --upgrade pip
# pip install --upgrade build twine
# - name: Build and publish
# if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml')
# env:
# TWINE_USERNAME: ${{ secrets.pypi_username }}
# TWINE_PASSWORD: ${{ secrets.pypi_password }}
# run: |
# for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do
# sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file;
# done;
# python -m build
# twine upload dist/*

0 comments on commit d9fdcfc

Please sign in to comment.