Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
z44d committed Jun 26, 2024
1 parent 6e141e8 commit 86fc846
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 20 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
tags: ["*"]

permissions:
contents: write
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4

- uses: abatilo/actions-poetry@v2

- run: poetry config virtualenvs.create true --local && poetry config virtualenvs.in-project true --local

- uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}

- run: poetry install

- run: poetry build

- uses: pypa/gh-action-pypi-publish@release/v1

- uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
55 changes: 39 additions & 16 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,47 @@
name: Check ruff format
name: ruff

on:
push:
branches: [ "*" ]
branches: [main]
pull_request:
branches: [ "*" ]

jobs:
check:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install ruff
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Check code format with ruff
run: |
ruff format --check tgram
- uses: actions/checkout@v4

- uses: actions/setup-python@v4

- uses: abatilo/actions-poetry@v2

- run: poetry config virtualenvs.create true --local && poetry config virtualenvs.in-project true --local

- uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}

- run: poetry install

- run: poetry run ruff format --check mtkruto examples

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v4

- uses: abatilo/actions-poetry@v2

- run: poetry config virtualenvs.create true --local && poetry config virtualenvs.in-project true --local

- uses: actions/cache@v3
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}

- run: poetry install

- run: poetry run ruff check mtkruto examples
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[project]
name = "tgram"
version = "0.1"
version = "1.0"
authors = [
{ name="ZAID", email="[email protected]" },
]
description = "tgram is python client based on Telegram BOT API"
description = "Very friendly BOT API library for python devs."
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
Expand All @@ -13,9 +13,8 @@ classifiers = [
"Operating System :: OS Independent",
]
dependencies = [
"aiohttp",
"aiohttp==3.9.4",
"asyncio",
"aiofiles",
]

[project.urls]
Expand Down

0 comments on commit 86fc846

Please sign in to comment.