Skip to content

Commit 7087055

Browse files
committed
publish system
1 parent 87a5711 commit 7087055

File tree

6 files changed

+51
-27
lines changed

6 files changed

+51
-27
lines changed

.github/workflows/python-publish.yml

+15-22
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,23 @@
1-
# This workflows will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
41
name: Upload Python Package
5-
62
on:
73
push:
84
tags:
9-
- '[0-9].[0-9].[0-9]'
10-
- '[0-9].[0-9].[0-9]-rc.[0-9]'
5+
- '[0-9]+\.[0-9]+\.[0-9]+'
6+
- '[0-9]+\.[0-9]+\.[0-9]+-?rc\.?[0-9]+'
117

128
jobs:
13-
deploy:
9+
pypi:
1410
runs-on: ubuntu-latest
1511
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up Python
18-
uses: actions/setup-python@v2
19-
with:
20-
python-version: '3.x'
21-
- name: Install dependencies
22-
run: |
23-
pip install setuptools wheel twine
24-
- name: Build and publish
25-
env:
26-
TWINE_USERNAME: __token__
27-
TWINE_PASSWORD: ${{ secrets.PYPI_GITHUB_ENVELOPE }}
28-
run: |
29-
python setup.py sdist bdist_wheel
30-
twine upload dist/*
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
- name: Replace media paths in README.md
17+
run: sed -E 's#(\]\((asset/[a-zA-Z0-9._-]+))#](https://github.com/CZ-NIC/envelope/blob/main/\2?raw=True#g' README.md | less > README.md.tmp && mv README.md.tmp README.md
18+
- name: Build the package
19+
run: python3 -m pip install --upgrade build && python3 -m build
20+
- name: Publish package
21+
uses: pypa/gh-action-pypi-publish@release/v1
22+
with:
23+
password: ${{ secrets.PYPI_GITHUB_ENVELOPE }}

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# CHANGELOG
22

3+
## 2.1.0 (2025-01-17)
4+
- reworked s/mime cryptography
5+
36
## 2.0.4 (2024-07-18)
47
- resilience against missing libmagic (useful on a contained environment)
58
- better SMTP retries #35

Makefile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export TAG := `grep version pyproject.toml | pz --search '"(\d+\.\d+\.\d+(?:rc\d+)?)?"'`
2+
3+
release:
4+
git tag $(TAG)
5+
git push origin $(TAG)
6+
#mkdocs gh-deploy

pyproject.toml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[build-system]
2+
requires = ["poetry-core>=1.0.0"]
3+
build-backend = "poetry.core.masonry.api"
4+
5+
[tool.poetry]
6+
name = "envelope"
7+
version = "2.1.0-pre1"
8+
description = "Insert a message and attachments and send e-mail / sign / encrypt contents by a single line."
9+
authors = ["Edvard Rejthar <[email protected]>"]
10+
license = "GNU GPLv3"
11+
homepage = "https://github.com/CZ-NIC/envelope"
12+
readme = "README.md"
13+
classifiers = ["Programming Language :: Python :: 3"]
14+
15+
[tool.poetry.dependencies]
16+
python = ">=3.10"
17+
jsonpickle = "*"
18+
python-magic = "*"
19+
python-gnupg = ">=0.5"
20+
py3-validate-email = "*"
21+
22+
[tool.poetry.extras]
23+
smime = ["cryptography>=43"]
24+
25+
[tool.poetry.scripts]
26+
envelope = "envelope.__main__:main"

requirements.txt

-4
This file was deleted.

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
setup(
2323
name='envelope',
24-
version='2.0.6',
24+
version='2.1.0-rc1',
2525
packages=['envelope'],
2626
author='Edvard Rejthar',
2727
author_email='[email protected]',

0 commit comments

Comments
 (0)