Skip to content

Commit

Permalink
[UPDATE] changes to CI, documentation, and versioning
Browse files Browse the repository at this point in the history
[UPDATE] changes to CI, documentation, and versioning
  • Loading branch information
mjfii authored Feb 9, 2024
2 parents 7ed3ea5 + 49c1560 commit bf3ee98
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 12 deletions.
Empty file added .gitattributes
Empty file.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

name: deploy-prod
name: main-tests

on:
push:
Expand All @@ -9,7 +9,7 @@ permissions:
contents: read

jobs:
deploy:
run-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Working Action
Expand All @@ -29,10 +29,3 @@ jobs:
python -m unittest tests/list_get_tests.py
python -m unittest tests/call_tests.py
python -m unittest tests/primitive_get_tests.py
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

name: Run Tests in Pre-Prod
name: stage-tests

on:
push:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/version-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

name: deploy-prod

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Working Action
uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
pip install -r requirements.txt
- name: Build dist
run: poetry build
- name: Build package
run: python -m build
- name: Publish package
env:
PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_API_TOKEN
poetry publish --build
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ profiles.yml
# custom
scratch/
.scratch/
scratch.py
temp/
.temp/
tmp/
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ build-backend = "setuptools.build_meta"

[project]
name = 'pyhydrate'
version = '1.0.5'
description = 'A JFDI approach that hydrates a Python class to allow dot notation access to the data structures.'
readme = "readme.md"
authors = [
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## PyHydrate
[![license](https://img.shields.io/github/license/mjfii/pyhydrate.svg)](https://github.com/mjfii/pyhydrate/blob/main/license)
[![pypi](https://img.shields.io/pypi/v/pyhydrate.svg)](https://pypi.python.org/pypi/pyhydrate)
[![deploy](https://github.com/mjfii/pyhydrate/workflows/deploy-prod/badge.svg?event=push)](https://github.com/mjfii/pyhydrate/actions?query=workflow%3Adeploy-prod+event%3Apush+branch%3Amain)
[![deploy-prod](https://github.com/mjfii/pyhydrate/actions/workflows/workflow.yml/badge.svg)](https://github.com/mjfii/pyhydrate/actions/workflows/workflow.yml)
[![downloads](https://static.pepy.tech/badge/pyhydrate/month)](https://pepy.tech/project/pyhydrate)
[![versions](https://img.shields.io/pypi/pyversions/pyhydrate.svg)](https://github.com/mjfii/pyhydrate)

Expand Down

0 comments on commit bf3ee98

Please sign in to comment.