mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2026-05-14 04:48:39 +08:00
ci: 添加发布至 PyPI
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
name: Setup Python
|
||||
description: Setup Python
|
||||
|
||||
inputs:
|
||||
python-version:
|
||||
description: Python version
|
||||
required: false
|
||||
default: "3.9"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ inputs.python-version }}
|
||||
|
||||
- name: Install poetry
|
||||
uses: Gr1N/setup-poetry@v7
|
||||
|
||||
- name: Cache Windows dependencies
|
||||
uses: actions/cache@v2
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
with:
|
||||
path: ~/AppData/Local/pypoetry/Cache/virtualenvs
|
||||
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||
|
||||
- name: Cache Linux dependencies
|
||||
uses: actions/cache@v2
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
with:
|
||||
path: ~/.cache/pypoetry/virtualenvs
|
||||
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||
|
||||
- name: Cache macOS dependencies
|
||||
uses: actions/cache@v2
|
||||
if: ${{ runner.os == 'macOS' }}
|
||||
with:
|
||||
path: ~/Library/Caches/pypoetry/virtualenvs
|
||||
key: ${{ runner.os }}-poetry-${{ inputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
|
||||
Reference in New Issue
Block a user