👷 Update GitHub action

This commit is contained in:
Karako 2023-04-02 17:09:18 +08:00
parent a9ef8df942
commit dc311e1ea8
No known key found for this signature in database
GPG Key ID: 5920831B0095D4A0
2 changed files with 23 additions and 16 deletions

23
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Publish Python package
on:
push:
tags:
- v*
release:
types: [ published ]
# Manual triggers with workflow_dispatch
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.16
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}

View File

@ -1,16 +0,0 @@
name: Python package
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.16
with:
pypi_token: ${{ secrets.PYPI_API_TOKEN }}