Skip to content

Commit eb6a3bf

Browse files
authored
add release workflow (#57)
1 parent 31205c4 commit eb6a3bf

File tree

2 files changed

+115
-2
lines changed

2 files changed

+115
-2
lines changed

.github/workflows/release.yaml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2+
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
name: Build distribution 📦
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up Python
15+
uses: actions/setup-python@v5
16+
with:
17+
python-version: "3.10"
18+
- name: Install pypa/build
19+
run: pip install build
20+
- name: Build a binary wheel and a source tarball
21+
run: python -m build
22+
- name: Store the distribution packages
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: python-package-distributions
26+
path: dist/
27+
if-no-files-found: error
28+
29+
publish-to-pypi:
30+
name: >-
31+
Publish Python 🐍 distribution 📦 to PyPI
32+
needs:
33+
- build
34+
runs-on: ubuntu-latest
35+
environment:
36+
name: pypi
37+
url: https://pypi.org/p/test_ci_release
38+
permissions:
39+
id-token: write # IMPORTANT: mandatory for trusted publishing
40+
41+
steps:
42+
- name: Download all the dists
43+
uses: actions/download-artifact@v4
44+
with:
45+
name: python-package-distributions
46+
path: dist/
47+
- name: Publish distribution 📦 to PyPI
48+
uses: pypa/gh-action-pypi-publish@release/v1
49+
50+
github-release:
51+
name: >-
52+
Sign the Python 🐍 distribution 📦 with Sigstore
53+
and upload them to GitHub Release
54+
needs:
55+
- publish-to-pypi
56+
runs-on: ubuntu-latest
57+
58+
permissions:
59+
contents: write # IMPORTANT: mandatory for making GitHub Releases
60+
id-token: write # IMPORTANT: mandatory for sigstore
61+
62+
steps:
63+
- name: Download all the dists
64+
uses: actions/download-artifact@v4
65+
with:
66+
name: python-package-distributions
67+
path: dist/
68+
69+
- name: Sign the dists with Sigstore
70+
uses: sigstore/[email protected]
71+
with:
72+
inputs: >-
73+
./dist/*.tar.gz
74+
./dist/*.whl
75+
# Prevent the action from uploading artifacts, because, by default it will uplpoad artifacts with tag name, too
76+
release-signing-artifacts: false
77+
78+
- name: Upload artifact signatures to GitHub Release
79+
env:
80+
GITHUB_TOKEN: ${{ github.token }}
81+
# Upload to GitHub Release using the `gh` CLI.
82+
# `dist/` contains the built packages, and the
83+
# sigstore-produced signatures and certificates.
84+
run: >-
85+
gh release upload
86+
'${{ github.ref_name }}' dist/**
87+
--repo '${{ github.repository }}'

pyproject.toml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
11
[tool.poetry]
22
name = "autointent"
3-
version = "0.2.1-alpha1"
3+
version = "0.0.1"
44
description = "A tool for automatically configuring a text classification pipeline for intent prediction."
5-
authors = ["voorhs <[email protected]>"]
5+
authors = ["Alexeev Ilya <[email protected]>", "Kuznetsov Denis <[email protected]>"]
6+
maintainers = [
7+
"Alexeev Ilya <[email protected]>",
8+
"Solomatin Roman <[email protected]>",
9+
"Sergeenko Egor <[email protected]>",
10+
]
611
readme = "README.md"
12+
homepage = "https://deeppavlov.github.io/AutoIntent/"
13+
repository = "https://github.com/deeppavlov/AutoIntent"
14+
documentation = "https://deeppavlov.github.io/AutoIntent/"
15+
keywords = ["nlp", "dialog-systems", "transformers", "auto-ml"]
16+
classifiers=[
17+
'Development Status :: 4 - Beta',
18+
'Intended Audience :: Developers',
19+
'Intended Audience :: Science/Research',
20+
'Natural Language :: English',
21+
'Natural Language :: Russian',
22+
'Operating System :: POSIX :: Linux',
23+
'Operating System :: Microsoft :: Windows',
24+
'Topic :: Scientific/Engineering :: Artificial Intelligence',
25+
'Topic :: Software Development :: Libraries :: Python Modules',
26+
'Topic :: Text Processing :: Linguistic',
27+
'Topic :: Utilities',
28+
'Framework :: Pytest',
29+
'Framework :: Sphinx',
30+
'Typing :: Typed',
31+
]
32+
733

834
[tool.poetry.dependencies]
935
python = "^3.10"

0 commit comments

Comments
 (0)