From 8a200614bab3a375fbfe3f815b9e02e1bb47e5e3 Mon Sep 17 00:00:00 2001 From: Uwe Roder Date: Fri, 27 May 2022 22:35:53 +0200 Subject: [PATCH] fix release pipeline --- .github/workflows/release.yml | 8 +++----- .github/workflows/test.yml | 2 +- README.md | 29 +++++++++++++++++++++++++++-- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d70b90f..595f029 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,10 +1,9 @@ -name: CI / CD +name: CI/CD Release on: push: - branches: - - main - - release + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' jobs: build-and-publish: @@ -65,7 +64,6 @@ jobs: skip_existing: true - name: Publish distribution 📦 to PyPI - if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@master with: password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a21ce34..7080780 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: CI / CD +name: CI/CD Test on: [ push, pull_request ] diff --git a/README.md b/README.md index 6c03508..c950117 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,30 @@ # Smart Signals -![Build](https://github.com/grobbles/SmartSignals/actions/workflows/build.yml/badge.svg) +![Build](https://github.com/grobbles/SmartSignals/actions/workflows/test.yml/badge.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) -[![codecov](https://codecov.io/gh/grobbles/SmartSignals/branch/main/graph/badge.svg?token=GAHKYKS1SD)](https://codecov.io/gh/grobbles/SmartSignals) \ No newline at end of file +[![codecov](https://codecov.io/gh/grobbles/SmartSignals/branch/main/graph/badge.svg?token=GAHKYKS1SD)](https://codecov.io/gh/grobbles/SmartSignals) + +# Install + +You can install this package with pip from PyPi. + +````bash +pip install SmartSignals +```` + +# Usage + +````python +from smart_signals import * + +class Test: + @SmartSignalSlot(str) + def slot(self, message: str): + print(message) + pass + +test = Test() +signal = SmartSignal(str) +signal.connect(test.slot) +signal.emit("message") +```` \ No newline at end of file