Skip to content

Bump setuptools from 78.1.0 to 78.1.1 #22

Bump setuptools from 78.1.0 to 78.1.1

Bump setuptools from 78.1.0 to 78.1.1 #22

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-and-publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
fail-fast: false # Continue even if one OS fails
steps:
# Checkout the repository
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for proper tag versioning
# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13.2'
# Install pyenv dependencies (Ubuntu only)
- name: Install pyenv dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev curl libncurses5-dev libncursesw5-dev \
xz-utils libffi-dev liblzma-dev python3-openssl
# Install dependencies
- name: Install project dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pyinstaller
# Run tests (placeholder—uncomment and adjust when tests are added)
# - name: Run tests
# run: |
# pip install pytest
# pytest tests/
# Build the executable with PyInstaller
- name: Build executable
run: |
pyinstaller pagertree.spec
shell: bash # Use bash for consistent scripting across OSes
# Set version using SEMVER
- name: Set version
id: version
run: |
# Get the latest tag, or default to 0.0.0 if none exists
LATEST_TAG=$(git tag --sort=-v:refname | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1 || echo "0.0.0")
# Increment patch version
IFS='.' read -r MAJOR MINOR PATCH <<< "$LATEST_TAG"
NEW_PATCH=$((PATCH + 1))
VERSION="$MAJOR.$MINOR.$NEW_PATCH"
echo "VERSION=$VERSION" >> $GITHUB_ENV
# Create or update the tag
git tag -f "$VERSION"
git push origin "$VERSION" --force
shell: bash
# Upload artifact
- name: Upload executable
uses: actions/upload-artifact@v4
with:
name: pagertree-${{ matrix.os == 'ubuntu-latest' && 'linux' || 'windows' }}-${{ env.VERSION }}
path: dist/pagertree${{ matrix.os == 'windows-latest' && '.exe' || '' }}
# Publish to GitHub Releases (only on push to main)
- name: Create Release
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.VERSION }}
name: Release ${{ env.VERSION }}
draft: false
prerelease: false
files: |
dist/pagertree
dist/pagertree.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}