Skip to content

bump: version 0.4.0 → 0.4.1 #4

bump: version 0.4.0 → 0.4.1

bump: version 0.4.0 → 0.4.1 #4

name: Build Wheels and Release
on:
push:
branches: [main, master]
tags:
- 'v*.*.*'
workflow_dispatch:
pull_request:
branches: [main, master]
jobs:
build:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
run: |
pip install uv
- name: Build wheels
run: |
uv build
- name: Upload wheels as artifact
uses: actions/upload-artifact@v4
with:
name: dist-wheels-${{ matrix.os }}
path: dist/*
test-wheels:
name: Test wheels on ${{ matrix.os }}
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Download wheels
uses: actions/download-artifact@v4
with:
name: dist-wheels-${{ matrix.os }}
path: dist
- name: List downloaded files
run: |
ls -la dist/
- name: Install wheel
shell: bash
run: |
pip install dist/*.whl
- name: Test import
run: |
python -c "import streamlit_image_coordinates; print('Package imported successfully')"
release:
name: Create GitHub Release
needs: [build, test-wheels]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download all wheels
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Collect all wheels
run: |
mkdir -p dist
find artifacts -name "*.whl" -exec cp {} dist/ \;
find artifacts -name "*.tar.gz" -exec cp {} dist/ \;
ls -la dist/
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/*
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}