Skip to content

Comment out test execution step in GitHub Actions workflow #8

Comment out test execution step in GitHub Actions workflow

Comment out test execution step in GitHub Actions workflow #8

Workflow file for this run

name: Build, Release & Publish Pixelcore
on:
push:
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
steps:
# 1. Checkout full repo
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0 # full history
# 2. Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
# 3. Install build dependencies
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install toml build twine
# 4. Read version from pyproject.toml
- name: Read package version
id: get_version
run: |
VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['project']['version'])")
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Version read: $VERSION"
# # 5. Optionally run tests
# - name: Run tests
# run: |
# python -m pip install -e .[dev]
# pytest tests
# 6. Create release & tag via GH CLI
- name: Create release (auto-tag)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ env.VERSION }}
run: |
if gh release view "v$VERSION" >/dev/null 2>&1; then
echo "Release v$VERSION already exists."
else
echo "Creating release v$VERSION..."
gh release create "v$VERSION" \
--title "v$VERSION" \
--notes "Release v$VERSION" \
--draft=false
fi
# 7. Build source + wheel distributions
- name: Build distributions
run: python -m build
# 8. Publish to PyPI
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ env.PYPI_API_TOKEN }}