File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " v*"
7
+
8
+ jobs :
9
+ release :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@v2
14
+
15
+ - name : Prepare
16
+ id : prepare
17
+ run : |
18
+ git fetch --prune --unshallow --tags -f
19
+
20
+ VERSION=$(git tag --points-at HEAD)
21
+ VERSION=${VERSION//v}
22
+
23
+ echo "## :bookmark_tabs: Changes" >>"CHANGELOG.md"
24
+ git log --pretty=format:"- %s%n" $(git describe --abbrev=0 --tags $(git describe --tags --abbrev=0)^)...$(git describe --tags --abbrev=0) >>"CHANGELOG.md"
25
+
26
+ echo ::set-output name=version::${VERSION}
27
+
28
+ - name : Publish a Python distribution to PyPI
29
+ uses : pypa/gh-action-pypi-publish@release/v1
30
+ with :
31
+ user : __token__
32
+ password : ${{ secrets.PYPI_API_TOKEN }}
33
+
34
+ - name : Create Release
35
+ uses : actions/create-release@v1
36
+ env :
37
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
38
+ with :
39
+ tag_name : ${{ github.ref }}
40
+ release_name : ${{ steps.prepare.outputs.version }}
41
+ body_path : CHANGELOG.md
42
+ draft : false
43
+ prerelease : false
Original file line number Diff line number Diff line change 40
40
41
41
- name : Perform CodeQL Analysis
42
42
uses : github/codeql-action/analyze@v1
43
+
44
+ - name : Test
45
+ run : |
46
+ pip install pytest pytest-cov
47
+ pytest tests/ --doctest-modules --cov=MCP2221 --cov-report term-missing
You can’t perform that action at this time.
0 commit comments