From 8f3f5daae73b1922818530dd046762926b308803 Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Sun, 8 Sep 2024 10:44:00 -0400 Subject: [PATCH] add publish action --- .github/workflows/workflow.yml | 47 ++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 0000000..87cad9c --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,47 @@ +name: Publish llm-cloudflare + +on: + release: + types: [created] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: pip + cache-dependency-path: pyproject.toml + - name: Install dependencies + run: | + pip install -e '.[test]' + deploy: + runs-on: ubuntu-latest + environment: release + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + cache: pip + cache-dependency-path: pyproject.toml + - name: Install uv + run: | + pip install uv + - name: Build + run: | + uv build + - name: Publish + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file