aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-05-14 15:06:40 +0300
committerJan Tuomi <jan@jantuomi.fi>2025-05-14 15:06:40 +0300
commitf1604690aa3f18e76a17dc457dcc6cb42841629a (patch)
tree5b043c3cc9af0fce6fd417e260f8a5d0b066b8f4 /.github/workflows
parent6061a73b84952de790ec2ccba457a5b1d7503e9d (diff)
Add workflow
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build-test-publish.yml38
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/build-test-publish.yml b/.github/workflows/build-test-publish.yml
new file mode 100644
index 0000000..d0f5073
--- /dev/null
+++ b/.github/workflows/build-test-publish.yml
@@ -0,0 +1,38 @@
+name: Test, Build, and Publish
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - "**"
+
+jobs:
+ test-build-publish:
+ runs-on: ubuntu-latest
+ name: Test, Build and Publish
+
+ steps:
+ - name: Checkout repo
+ uses: actions/checkout@v3
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: "3.11"
+
+ - name: Install uv
+ run: pip install uv
+
+ - name: Run tests
+ run: python test.py
+
+ - name: Build package
+ run: uv build
+
+ - name: Publish to PyPI
+ if: github.ref == 'refs/heads/main'
+ run: uv publish
+ env:
+ UV_PYPI_TOKEN: ${{ secrets.UV_PYPI_TOKEN }}