File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and publish Python 🐍 distributions
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' *'
7
+
8
+ jobs :
9
+ build-n-publish :
10
+ name : Build and publish Python 🐍 distributions
11
+ runs-on : ubuntu-20.04
12
+
13
+ steps :
14
+ - name : Checkout code
15
+ uses : actions/checkout@v2
16
+
17
+ - name : Set up Python 3.8 🐍
18
+ uses : actions/setup-python@v2
19
+ with :
20
+ python-version : 3.8
21
+
22
+ - name : Install dependencies
23
+ run : python -m pip install --user --upgrade pip setuptools wheel twine
24
+
25
+ # - name: Insert version number
26
+ # run: |
27
+ # version=$(echo $GITHUB_REF | cut -d/ -f3)
28
+ # sed -ie "/^version/s/=.*/= \"$version\"/" po_excel_translate.py
29
+
30
+ - name : Generate changelog
31
+ uses : scottbrenner/generate-changelog-action@master
32
+ id : Changelog
33
+ env :
34
+ REPO : ${{ github.repository }}
35
+
36
+ - name : Build a binary wheel and a source tarball
37
+ run : python setup.py sdist bdist_wheel
38
+
39
+ - name : Publish package
40
+ if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
41
+ uses : pypa/gh-action-pypi-publish@master
42
+ with :
43
+ user : __token__
44
+ password : ${{ secrets.PYPI_PASSWORD }}
45
+
46
+ - name : Create Release
47
+ id : create_release
48
+ uses : actions/create-release@latest
49
+ env :
50
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51
+ with :
52
+ tag_name : ${{ github.ref }}
53
+ release_name : Release ${{ github.ref }}
54
+ body : |
55
+ ${{ steps.Changelog.outputs.changelog }}
56
+ draft : false
57
+ prerelease : false
You can’t perform that action at this time.
0 commit comments