Parcourir la source

add: github action

Tang Ziya il y a 11 mois
Parent
commit
b60989627e
1 fichiers modifiés avec 31 ajouts et 0 suppressions
  1. 31 0
      .github/workflows/ci.yml

+ 31 - 0
.github/workflows/ci.yml

@@ -0,0 +1,31 @@
+name: Release
+
+on:
+  push:
+    branches:
+      - main # or whatever branch you want to use
+
+jobs:
+  release:
+    runs-on: ubuntu-latest
+    environment:
+        name: pypi
+        url: https://pypi.org/p/open-webui
+    permissions:
+        id-token: write
+    steps:
+        - name: Checkout repository
+          uses: actions/checkout@v4
+        - uses: actions/setup-node@v4
+          with:
+            node-version: 18
+        - uses: actions/setup-python@v5
+          with:
+            python-version: 3.11
+        - name: Build
+          run: |
+            python -m pip install --upgrade pip
+            pip install build
+            python -m build .
+        - name: Publish package distributions to PyPI
+          uses: pypa/gh-action-pypi-publish@release/v1