Skip to content

Commit cf3e978

Browse files
authored
feat: First release (#1)
* Add docs image * Add license * Update pyproject.toml in prep for release * Add github actions
1 parent b60157c commit cf3e978

File tree

6 files changed

+131
-696
lines changed

6 files changed

+131
-696
lines changed

.github/workflows/ci.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branch:
6+
7+
jobs:
8+
lint_test:
9+
name: Lint & Test
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Setup Python
16+
uses: twh2898/reusable-workflows/setup_python@main
17+
with:
18+
python-version: "3.12"
19+
poetry-version: "1.8.5"
20+
21+
- name: Install Dependencies
22+
run: poetry install
23+
24+
- name: Lint
25+
run: poetry run ruff check .
26+
27+
# - name: Test
28+
# run: poetry run pytest tests --cov=src --cov-branch --cov-fail-under=100
29+
30+
build_release:
31+
name: Build Release
32+
runs-on: ubuntu-latest
33+
if: github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'NO RELEASE')
34+
35+
needs: lint_test
36+
37+
permissions:
38+
contents: write
39+
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Increment Version
44+
uses: twh2898/reusable-workflows/increment_version@main
45+
id: version
46+
47+
- name: Setup Python
48+
uses: twh2898/reusable-workflows/setup_python@main
49+
with:
50+
python-version: "3.12"
51+
poetry-version: "1.8.5"
52+
53+
- name: Install Dependencies
54+
run: poetry install
55+
56+
- name: Set version
57+
env:
58+
VERSION: ${{ steps.version.outputs.version }}
59+
run: |
60+
poetry version $VERSION
61+
62+
- name: Build Release
63+
run: |
64+
poetry build
65+
66+
- name: Create Release
67+
uses: ncipollo/release-action@v1.14.0
68+
with:
69+
artifacts: "dist/*.whl"
70+
makeLatest: true
71+
generateReleaseNotes: true
72+
tag: ${{ steps.version.outputs.version }}
73+
74+
# - name: Publish Package
75+
# env:
76+
# PYPI_TOKEN: ${{ secrets.PYPI_KEY }}
77+
# run: |
78+
# poetry config pypi-token.pypi $PYPI_TOKEN
79+
# poetry publish

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,4 @@ dmypy.json
9797
cython_debug/
9898

9999
*.png
100+
!docs/*.png

LICENSE

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Copyright 2025 Thomas Harrison <theharrisoncrafter@gmail.com>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of
4+
this software and associated documentation files (the “Software”), to deal in
5+
the Software without restriction, including without limitation the rights to
6+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7+
the Software, and to permit persons to whom the Software is furnished to do so,
8+
subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

docs/test.png

17.9 KB
Loading

0 commit comments

Comments
 (0)