-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (41 loc) · 1.21 KB
/
release.yml
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Upload Python Package
on:
push:
branches:
- develop
permissions:
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements-deploy.txt ]; then pip install -r requirements-deploy.txt; fi
- name: Build package
run: |
changelog2version \
--changelog_file changelog.md \
--version_file nextion/version.py \
--version_file_type py \
--debug
python setup.py sdist
- name: Publish package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
twine check dist/*.tar.gz
twine upload \
--skip-existing \
--verbose \
dist/*.tar.gz