Skip to content

Commit 8823cec

Browse files
2 parents 704d4f6 + 0f5458c commit 8823cec

4 files changed

Lines changed: 100 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
pip install -e ".[dev]"
27+
28+
- name: Run tests
29+
run: |
30+
python -m pytest tests/ -v --cov=src --cov-report=term-missing

.github/workflows/publish.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
pypi_target:
9+
description: 'PyPI target (pypi or testpypi)'
10+
default: 'testpypi'
11+
type: choice
12+
options:
13+
- pypi
14+
- testpypi
15+
16+
jobs:
17+
build-and-publish:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
id-token: write
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- name: Set up Python 3.11
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: "3.11"
30+
31+
- name: Install build deps
32+
run: |
33+
pip install build twine
34+
35+
- name: Build package
36+
run: |
37+
python -m build
38+
39+
- name: Publish to PyPI
40+
if: ${{ inputs.pypi_target != 'testpypi' || github.event_name == 'release' }}
41+
env:
42+
TWINE_USERNAME: __token__
43+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
44+
run: |
45+
twine upload dist/* --verbose
46+
47+
- name: Publish to TestPyPI
48+
if: ${{ inputs.pypi_target == 'testpypi' }}
49+
env:
50+
TWINE_USERNAME: __token__
51+
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }}
52+
run: |
53+
twine upload --repository testpypi dist/* --verbose

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
__pycache__/
2+
*.pyc
3+
*.pyo
4+
.env
5+
.venv/
6+
venv/
7+
dist/
8+
*.egg-info/
9+
.pytest_cache/
10+
.coverage
11+
htmlcov/

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ Preview infrastructure changes with human-readable diffs, cost impact estimation
1414
pip install deploydiff
1515
```
1616

17+
Or install directly from GitHub:
18+
19+
```bash
20+
pip install git+https://github.com/Coding-Dev-Tools/deploydiff.git
21+
```
22+
1723
## Usage
1824

1925
```bash

0 commit comments

Comments
 (0)