Skip to content

Commit 93a41d5

Browse files
authored
Github actions (#2)
1 parent 250a033 commit 93a41d5

File tree

6 files changed

+125
-0
lines changed

6 files changed

+125
-0
lines changed

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
Pull request type:
2+
- [ ] Feature
3+
- [ ] Bug fix
4+
- [ ] Documentation
5+
- [ ] Breaking change
6+
7+
I have:
8+
- [ ] Tested the code
9+
- [ ] Wrote unit tests for the code
10+
- [ ] Documented changes:
11+
- [ ] Guide(s)
12+
- [ ] API reference
13+
- [ ] Changelog
14+
15+
Changes:
16+
-
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
on:
2+
workflow_dispatch:
3+
inputs:
4+
version-major:
5+
type: string
6+
description: Major version (eg. x.0.0)
7+
version-minor:
8+
type: string
9+
description: Minor version (eg. 0.x.0)
10+
11+
version-bugfix:
12+
type: string
13+
description: Bug fix version (eg. 0.0.x)
14+
default: "0"
15+
16+
name: Create Release
17+
18+
jobs:
19+
build:
20+
name: Create Release
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@master
25+
- name: Create tag
26+
id: tag_version
27+
uses: mathieudutour/[email protected]
28+
with:
29+
github_token: ${{ secrets.TOKEN_GH }}
30+
custom_tag : ${{github.event.inputs.version-major}}.${{github.event.inputs.version-minor}}.${{github.event.inputs.version-bugfix}}
31+
- name: Create Release
32+
id: create_release
33+
uses: actions/create-release@latest
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.TOKEN_GH }} # This token is provided by Actions, you do not need to create your own token
36+
with:
37+
tag_name: ${{ steps.tag_version.outputs.new_tag }}
38+
release_name: ${{ steps.tag_version.outputs.new_tag }}
39+
body: "Changelog: /en/v${{github.event.inputs.version-major}}.${{github.event.inputs.version-minor}}.x/changelog.html"
40+
draft: false
41+
prerelease: false
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to PyPi
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
# Build job
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: "3.x"
21+
cache: 'pip'
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install build
27+
28+
- name: Build
29+
run: |
30+
python -m build
31+
32+
- name: Publish package
33+
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e
34+
with:
35+
user: __token__
36+
password: ${{ secrets.PYPI_API_TOKEN }}

docs/source/changelog.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
========================
2+
Changelog
3+
========================
4+
.. |BREAK_CH| replace:: **[Breaking change]**
5+
6+
.. |POTENT_BREAK_CH| replace:: **[Potentially breaking change]**
7+
8+
.. |UNRELEASED| replace:: **[Not yet released]**
9+
10+
11+
Glossary
12+
======================
13+
.. glossary::
14+
15+
|BREAK_CH|
16+
Means that the change will break functionality from previous version.
17+
18+
|POTENT_BREAK_CH|
19+
The change could break functionality from previous versions but only if it
20+
was used in a certain way.
21+
22+
23+
---------------------
24+
Releases
25+
---------------------
26+
27+
v1.0.0
28+
=================
29+
- Initial release

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,5 @@ Table of contents
8989

9090
guide/index
9191
reference/index
92+
changelog
9293

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ classifiers = [
2121
"Operating System :: OS Independent",
2222
]
2323

24+
license = "MIT"
25+
2426
dynamic = ["optional-dependencies", "version"]
2527

2628

0 commit comments

Comments
 (0)