diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 209736d..fe6b55b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -6,7 +6,7 @@ on: branches: - master workflow_dispatch: - # Publish trigger: only when the PR merge commits are pushed to main + # Publish trigger: only when the PR merge commits are pushed to master push: branches: - master @@ -21,8 +21,8 @@ jobs: name: Dry-Run Build & Check runs-on: ubuntu-latest - # Allow dry-run on all events except when pushing to master - if: github.event_name != 'push' || github.ref != 'refs/heads/master' + # Allow dry-run on pull_request and workflow_dispatch events + if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }} steps: - name: Check out code uses: actions/checkout@v4 @@ -51,10 +51,9 @@ jobs: publish: name: Publish to PyPI runs-on: ubuntu-latest - needs: dry-run # Only fire on the push-to-master that completes the PR - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} steps: - name: Check out code uses: actions/checkout@v4 @@ -76,4 +75,4 @@ jobs: TWINE_USERNAME: __token__ run: | # avoid failures if you accidentally re-publish the same version - python -m twine upload --skip-existing dist/* \ No newline at end of file + python -m twine upload --skip-existing dist/* diff --git a/README.md b/README.md index c8a12ab..d7e06da 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,11 @@ # APEER Python SDK -[![Build Status](https://travis-ci.com/apeer-micro/apeer-python-sdk.svg?branch=master)](https://travis-ci.com/apeer-micro/apeer-python-sdk) -[![Python 2.7](https://img.shields.io/badge/python-2.7-blue.svg)](https://www.python.org/download/releases/2.7/) -[![Python 3.6](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/) +[![Build & Publish to PyPI](https://github.com/apeer-micro/apeer-python-sdk/actions/workflows/publish.yml/badge.svg?branch=master)](https://github.com/apeer-micro/apeer-python-sdk/actions/workflows/publish.yml) +[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/) +[![Python 3.9](https://img.shields.io/badge/python-3.9-blue.svg)](https://www.python.org/downloads/release/python-390/) +[![Python 3.10](https://img.shields.io/badge/python-3.10-blue.svg)](https://www.python.org/downloads/release/python-3100/) +[![Python 3.11](https://img.shields.io/badge/python-3.11-blue.svg)](https://www.python.org/downloads/release/python-3110/) +[![Python 3.12](https://img.shields.io/badge/python-3.12-blue.svg)](https://www.python.org/downloads/release/python-3120/) [![PyPI Version](https://img.shields.io/pypi/v/apeer-dev-kit.svg)](https://pypi.org/project/apeer-dev-kit/) [![License](https://img.shields.io/badge/Code%20License-MIT-blue.svg)](https://github.com/apeer-micro/apeer-python-sdk/blob/master/LICENSE.txt)