File tree Expand file tree Collapse file tree 4 files changed +46
-5
lines changed Expand file tree Collapse file tree 4 files changed +46
-5
lines changed Original file line number Diff line number Diff line change 1
1
name : " Check with pre-commit"
2
2
on :
3
- - " push"
4
- - " pull_request"
3
+ push :
4
+ branches : ["main"]
5
+ pull_request :
5
6
6
7
jobs :
7
8
Original file line number Diff line number Diff line change
1
+ name : " Release"
2
+ on :
3
+ release :
4
+ types :
5
+ - " published"
6
+
7
+ jobs :
8
+
9
+ build-and-release :
10
+ runs-on : " ubuntu-latest"
11
+ steps :
12
+ - uses : " actions/checkout@v3"
13
+
14
+ - name : " Set up Python"
15
+ uses : " actions/setup-python@v4"
16
+ with :
17
+ python-version : " 3.9"
18
+
19
+ - name : " Install build tool"
20
+ run : " pip install --user build"
21
+
22
+ - name : " Build binary dist (wheel) and source dist"
23
+ run : " python -m build"
24
+
25
+ - name : " Publish to PyPI"
26
+ uses : " pypa/gh-action-pypi-publish@release/v1"
27
+ with :
28
+ password : " ${{ secrets.PYPI_TOKEN }}"
29
+ repository-url : " https://pypi.org/project/viscm"
Original file line number Diff line number Diff line change 1
- name : " Unit test "
1
+ name : " Test "
2
2
on :
3
- - " push"
4
- - " pull_request"
3
+ push :
4
+ branches : ["main"]
5
+ pull_request :
5
6
6
7
jobs :
7
8
Original file line number Diff line number Diff line change @@ -69,3 +69,13 @@ make typecheck
69
69
```
70
70
71
71
Type checking requires ` mypy ` .
72
+
73
+
74
+ ## Making a release and publishing to PyPI
75
+
76
+ Create a release using the GitHub user interface. Tag the version following
77
+ [ semver] ( https://semver.org ) . * NOTE: As this software is pre-1.x, always increment the
78
+ minor version only.*
79
+
80
+ Once the release is published in GitHub, a GitHub Action will be triggered to build and
81
+ upload to PyPI.
You can’t perform that action at this time.
0 commit comments