-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.22 KB
/
release.yml
File metadata and controls
55 lines (46 loc) · 1.22 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Release
on:
release:
types: [ published ]
repository_dispatch:
workflow_dispatch:
inputs:
upload_pypi:
description: 'upload to PyPI'
type: boolean
required: false
default: false
jobs:
build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.13
cache: 'pip'
- name: Install requirements
run: pip install build setuptools twine -U
- name: Build package
run: |
python -m build --sdist
twine check dist/*
pip install dist/*
- name: Upload sdist to github artifact
uses: actions/upload-artifact@v5
with:
name: logbar
path: dist/*gz
- name: Upload sdist to pypi
if: (github.event_name == 'release' || github.event.inputs.upload_pypi == 'true') && !cancelled()
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_KEY }}
run: |
python -m twine upload dist/*gz
- name: Clean cache
if: always()
run: |
pip cache purge || true
rm -rf ../LogBar/*