✨ chore: update version and dependencies #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build-and-publish: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install Hatch | |
run: pip install hatch | |
- name: Build project | |
run: hatch build | |
- name: Publish to PyPI | |
env: | |
HATCH_INDEX_USER: __token__ | |
HATCH_INDEX_AUTH: ${{ secrets.PYPI_TOKEN }} | |
run: hatch publish | |
- name: Get version | |
id: get_version | |
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
github-release: | |
name: Create GitHub Release | |
needs: build-and-publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create GitHub Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create "${GITHUB_REF#refs/tags/}" \ | |
--repo '${{ github.repository }}' \ | |
--title "${GITHUB_REF#refs/tags/}" \ | |
--generate-notes | |
verify-installation: | |
name: Verify Package Installation | |
needs: build-and-publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Wait for PyPI to process the upload | |
run: | | |
echo "Waiting for PyPI to process the upload..." | |
sleep 300 | |
- name: Get version | |
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
- name: Install and verify package | |
run: | | |
python -m venv test_env | |
source test_env/bin/activate | |
pip install --upgrade pip | |
pip install gitmuse==$VERSION --no-cache-dir --verbose | |
gitmuse --version | |
- name: Debug PyPI package info | |
if: failure() | |
run: | | |
pip install yolk3k | |
yolk -V gitmuse | |
yolk -F gitmuse | |
pip install gitmuse==$VERSION --no-cache-dir --verbose |