Skip to content

Commit

Permalink
chore: merge CI/CD workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsbarnard committed Jan 16, 2024
1 parent fccd808 commit 8e0d760
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 43 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/cd.yml

This file was deleted.

34 changes: 33 additions & 1 deletion .github/workflows/ci.yml → .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GitHub action for CI: linting, testing, and releasing
# GitHub action for CI/CD: linting/testing, releasing, and publishing

name: ci

Expand Down Expand Up @@ -59,6 +59,38 @@ jobs:
fetch-depth: 0

- name: Python Semantic Release
id: semantic_release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

outputs:
released: ${{ steps.semantic_release.outputs.released }}

publish:
needs: release
if: needs.release.outputs.released == 'true'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9

- name: Install Poetry
run: |
python -m pip install --upgrade pip
python -m pip install poetry
- name: Build
run: |
poetry build
- name: Publish to PyPI
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ AuthHeader(

The `fathomnet-py` API offers native Python interaction with the FathomNet REST API, abstracting away the underlying HTTP requests.

[![CI](https://github.com/fathomnet/fathomnet-py/actions/workflows/ci.yml/badge.svg)](https://github.com/fathomnet/fathomnet-py/actions/workflows/ci.yml)
[![CI/CD](https://github.com/fathomnet/fathomnet-py/actions/workflows/cicd.yml/badge.svg)](https://github.com/fathomnet/fathomnet-py/actions/workflows/cicd.yml)
[![Documentation Status](https://readthedocs.org/projects/fathomnet-py/badge/?version=latest)](https://fathomnet-py.readthedocs.io/en/latest/?badge=latest)
[![Open in Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/fathomnet/fathomnet-py/blob/main/tutorial.ipynb)
## Installing `fathomnet-py`
Expand Down
6 changes: 3 additions & 3 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ fathomnet-py
The ``fathomnet-py`` API offers native Python interaction with the FathomNet REST API, abstracting away the underlying HTTP requests.

.. image:: https://github.com/fathomnet/fathomnet-py/actions/workflows/ci.yml/badge.svg
:target: https://github.com/fathomnet/fathomnet-py/actions/workflows/ci.yml
:alt: ci
.. image:: https://github.com/fathomnet/fathomnet-py/actions/workflows/cicd.yml/badge.svg
:target: https://github.com/fathomnet/fathomnet-py/actions/workflows/cicd.yml
:alt: cicd

.. image:: https://readthedocs.org/projects/fathomnet-py/badge/?version=latest
:target: https://fathomnet-py.readthedocs.io/en/latest/?badge=latest
Expand Down

0 comments on commit 8e0d760

Please sign in to comment.