forked from phenom-films/dayu_widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1018 Bytes
/
Copy pathpython-publish.yml
File metadata and controls
39 lines (37 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Upload Python Package
on:
push:
tags:
- "v*"
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}'
fetch-depth: 0
- name: Set output
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install -U pip poetry mkdocs mkdocs-material
poetry --version
poetry build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist
- name: Create release Version
run: gh release create ${{ steps.vars.outputs.tag }} --generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}