HellMBot/.gitea/workflows/python-build.yml

37 lines
872 B
YAML
Raw Normal View History

2024-06-08 22:18:51 +00:00
name: Build Python Package
on:
push:
branches:
- main
jobs:
build:
runs-on: python-3.12.3-alpine3.19
steps:
2024-06-08 22:47:48 +00:00
- name: Checkout repository
uses: actions/checkout@v2
2024-06-08 22:18:51 +00:00
- name: Create and activate virtual environment
run: |
python -m venv venv
2024-06-08 23:10:37 +00:00
source venv/bin/activate
2024-06-08 22:18:51 +00:00
- name: Install dependencies
run: |
source venv/bin/activate
pip install --upgrade pip
2024-06-08 23:10:37 +00:00
pip install setuptools discord.py twine
2024-06-08 22:18:51 +00:00
- name: Build the package
run: |
source venv/bin/activate
python setup.py sdist
2024-06-08 23:10:37 +00:00
- name: Upload package
run: |
source venv/bin/activate
2024-06-08 23:19:55 +00:00
twine upload --repository-url https://git.orudo.ru/api/packages/trueold89/pypi -u trueold89 -p $TOKEN dist/*
2024-06-08 23:10:37 +00:00
env:
TOKEN: ${{ secrets.TOKEN }}