🚸 添加发布工作流
This commit is contained in:
26
.github/workflows/pypi-publish.yml
vendored
Normal file
26
.github/workflows/pypi-publish.yml
vendored
Normal file
@ -0,0 +1,26 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
pypi-publish:
|
||||
name: upload release to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# 这个权限是为了私有仓库。
|
||||
contents: read
|
||||
# 重要提示:这个权限对于可信发布是必需的。
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: pdm-project/setup-pdm@v3
|
||||
|
||||
- name: Publish package distributions to PyPI
|
||||
run: pdm publish
|
Reference in New Issue
Block a user