Skip to content

Commit

Permalink
publish system
Browse files Browse the repository at this point in the history
  • Loading branch information
e3rd committed Jan 17, 2025
1 parent 87a5711 commit 7087055
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 27 deletions.
37 changes: 15 additions & 22 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
# This workflows will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries

name: Upload Python Package

on:
push:
tags:
- '[0-9].[0-9].[0-9]'
- '[0-9].[0-9].[0-9]-rc.[0-9]'
- '[0-9]+\.[0-9]+\.[0-9]+'
- '[0-9]+\.[0-9]+\.[0-9]+-?rc\.?[0-9]+'

jobs:
deploy:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_GITHUB_ENVELOPE }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Replace media paths in README.md
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
- name: Build the package
run: python3 -m pip install --upgrade build && python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_GITHUB_ENVELOPE }}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## 2.1.0 (2025-01-17)
- reworked s/mime cryptography

## 2.0.4 (2024-07-18)
- resilience against missing libmagic (useful on a contained environment)
- better SMTP retries #35
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export TAG := `grep version pyproject.toml | pz --search '"(\d+\.\d+\.\d+(?:rc\d+)?)?"'`

release:
git tag $(TAG)
git push origin $(TAG)
#mkdocs gh-deploy
26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "envelope"
version = "2.1.0-pre1"
description = "Insert a message and attachments and send e-mail / sign / encrypt contents by a single line."
authors = ["Edvard Rejthar <[email protected]>"]
license = "GNU GPLv3"
homepage = "https://github.com/CZ-NIC/envelope"
readme = "README.md"
classifiers = ["Programming Language :: Python :: 3"]

[tool.poetry.dependencies]
python = ">=3.10"
jsonpickle = "*"
python-magic = "*"
python-gnupg = ">=0.5"
py3-validate-email = "*"

[tool.poetry.extras]
smime = ["cryptography>=43"]

[tool.poetry.scripts]
envelope = "envelope.__main__:main"
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

setup(
name='envelope',
version='2.0.6',
version='2.1.0-rc1',
packages=['envelope'],
author='Edvard Rejthar',
author_email='[email protected]',
Expand Down

0 comments on commit 7087055

Please sign in to comment.