Skip to content

Commit

Permalink
Merge pull request #2 from jaidenlabelle/merge-v0.1.8
Browse files Browse the repository at this point in the history
Merge v0.1.8 into main
  • Loading branch information
jaidenlabelle authored Nov 27, 2024
2 parents c65f244 + 203e19c commit 42288b3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 50 deletions.
73 changes: 24 additions & 49 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,37 @@
name: Publish

on:
workflow_dispatch:
pull_request:
push:
branches:
- main
release:
types:
- published
on: push

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_BEFORE_ALL: pip install lz4==4.3.3

- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
build:
name: Build distribution
runs-on: ubuntu-latest

steps:
# Download the repository into the CI runner
# Then, install and activate the newest Python 3 release
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist

- name: set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install pypa/build
run: python3 -m pip install build --user
# Build the dists from source and store them
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Publish distribution to PyPI
# Only publish to PyPI on tag pushes
if: startsWith(github.ref, 'refs/tags/')
needs: [build_wheels, build_sdist]
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
Expand All @@ -62,10 +42,8 @@ jobs:
- name: Download the distribution packages
uses: actions/download-artifact@v4
with:
pattern: cibw-*
name: python-package-distributions
path: dist/
merge-multiple: true

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

Expand All @@ -85,10 +63,8 @@ jobs:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
pattern: cibw-*
name: python-package-distributions
path: dist/
merge-multiple: true

- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
Expand Down Expand Up @@ -117,7 +93,8 @@ jobs:
publish-to-testpypi:
name: Publish distribution to TestPyPI
needs: [build_wheels, build_sdist]
needs:
- build
runs-on: ubuntu-latest

environment:
Expand All @@ -131,10 +108,8 @@ jobs:
- name: Download the distribution packages
uses: actions/download-artifact@v4
with:
pattern: cibw-*
name: python-package-distributions
path: dist/
merge-multiple: true

- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "tuya-vacuum"
version = "0.1.7"
version = "0.1.8"
description = "A python library to view maps from Tuya robot vacuums"
authors = [
{ name = "Jaiden Labelle", email = "jaidenjlabelle@gmail.com" }
Expand Down

0 comments on commit 42288b3

Please sign in to comment.