aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.github/workflows/python-publish.yml
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-07-04 12:32:32 +0800
committerGitHub <noreply@github.com>2023-07-04 12:32:32 +0800
commit2e4908b3c1c2dc7351fd8829ee83ef754f0c6375 (patch)
treed057171a422804c4239d4f10a2d6aef5b96959c0 /.github/workflows/python-publish.yml
parent8ea636717ab2f44a1c34d44ef3d358421203b8e0 (diff)
downloadinfini-2e4908b3c1c2dc7351fd8829ee83ef754f0c6375.tar.gz
infini-2e4908b3c1c2dc7351fd8829ee83ef754f0c6375.zip
Update python-publish.yml
Diffstat (limited to '.github/workflows/python-publish.yml')
-rw-r--r--.github/workflows/python-publish.yml50
1 files changed, 25 insertions, 25 deletions
diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml
index ba5bf1c7..2464c134 100644
--- a/.github/workflows/python-publish.yml
+++ b/.github/workflows/python-publish.yml
@@ -1,31 +1,31 @@
-# This workflow will upload a Python Package using Twine when a release is created
-# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
-
-name: Upload Python Package
-
on:
- release:
- types: [created]
+ push:
+ tags:
+ - "v*"
+ workflow_dispatch:
jobs:
- deploy:
-
+ build:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v2
- with:
- python-version: '3.9'
- - name: Install dependencies
- run: |
- python3 -m pip install --upgrade build
- python3 -m pip install --user --upgrade twine
- - name: Build and publish
- env:
- TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
- TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- run: |
- python3 -m build
- python3 -m twine upload dist/*
+ - uses: actions/checkout@v3
+
+ - name: Install poetry
+ run: pipx install poetry
+ shell: bash
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.9"
+ architecture: "x64"
+ cache: "poetry"
+ - run: poetry install
+ shell: bash
+
+ - run: poetry config pypi-token.pypi "$PYPI_TOKEN"
+ shell: bash
+ env:
+ PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
+
+ - run: poetry publish --build
+ shell: bash