Skip to content

Merge pull request #34 from ProdByGodfather/33-issue-github-actions-w… #4

Merge pull request #34 from ProdByGodfather/33-issue-github-actions-w…

Merge pull request #34 from ProdByGodfather/33-issue-github-actions-w… #4

Workflow file for this run

name: Publish to PyPI
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v3
# Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
# Install dependencies for building and publishing
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build twine
# Extract version from setup.py
- name: Extract version from setup.py
id: extract_version
run: |
version=$(python setup.py --version)
echo "VERSION=$version" >> $GITHUB_ENV
# Log the extracted version
- name: Show extracted version
run: echo "Extracted Version: ${{ env.VERSION }}"

Check failure on line 38 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 38
# Build the package
- name: Build the package
run: python -m build
# Publish to PyPI
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*