winglian commited on
Commit
bcbc959
1 Parent(s): 6d57f2f

replace tags, build dist for pypi publish (#553)

Browse files

* replace tags, build dist for pypi publish

* missing trailing comma

Files changed (1) hide show
  1. .github/workflows/pypi.yml +26 -1
.github/workflows/pypi.yml CHANGED
@@ -15,6 +15,31 @@ jobs:
15
  permissions:
16
  id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
17
  steps:
18
- # retrieve your distributions here
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  - name: Publish package distributions to PyPI
20
  uses: pypa/gh-action-pypi-publish@release/v1
 
15
  permissions:
16
  id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
17
  steps:
18
+ - name: Check out repository code
19
+ uses: actions/checkout@v3
20
+
21
+ - name: Setup Python
22
+ uses: actions/setup-python@v4
23
+ with:
24
+ python-version: "3.10"
25
+
26
+ - name: Install dependencies
27
+ run: |
28
+ pip3 install wheel
29
+ pip3 install -e .
30
+ pip3 install -r requirements-tests.txt
31
+
32
+ - name: Extract tag name
33
+ id: tag
34
+ run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3)
35
+
36
+ - name: Update version in setup.py
37
+ run: >-
38
+ sed -E 's/version=\"([\d\.]+)",/version="${{ steps.tag.outputs.TAG_NAME }}",/g' setup.py
39
+
40
+ - name: Build a binary wheel
41
+ run: >-
42
+ python setup.py sdist bdist_wheel
43
+
44
  - name: Publish package distributions to PyPI
45
  uses: pypa/gh-action-pypi-publish@release/v1