Skip to content

Commit ef8e00f

Browse files
committedJan 27, 2021
Merge release/deploy CD into publish and attach artifacts to GH release
1 parent a49425e commit ef8e00f

File tree

1 file changed

+18
-23
lines changed

1 file changed

+18
-23
lines changed
 

‎.github/workflows/publish.yml

+18-23
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,23 @@ on:
66
- 'v*'
77

88
jobs:
9-
release:
9+
publish:
1010
name: Create Release
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout Code
1414
uses: actions/checkout@master
15-
- name: Create Release
15+
- name: Set Up Python
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: '3.7'
19+
- name: Install Python Dependencies
20+
run: |
21+
python -m pip install -U pip
22+
python -m pip install -U setuptools wheel
23+
- name: Build Distributions
24+
run: python setup.py sdist bdist_wheel
25+
- name: Create GitHub Release
1626
id: create_release
1727
uses: actions/create-release@v1
1828
env:
@@ -24,24 +34,9 @@ jobs:
2434
Change Log:
2535
draft: true # Give me a moment to fill in the description
2636
prerelease: false
27-
deploy:
28-
name: Deploy Release to PyPI
29-
needs: release
30-
runs-on: ubuntu-latest
31-
steps:
32-
- uses: actions/checkout@v1
33-
- name: Set Up Python
34-
uses: actions/setup-python@v1
35-
with:
36-
python-version: '3.7'
37-
- name: Install dependencies
38-
run: |
39-
python -m pip install -U pip
40-
python -m pip install -U setuptools wheel
41-
- name: Build
42-
run: python setup.py sdist bdist_wheel
43-
- name: Publish
44-
uses: pypa/gh-action-pypi-publish@master
45-
with:
46-
user: __token__
47-
password: ${{ secrets.PYPI_TOKEN }}
37+
artifacts: "dist/*"
38+
- name: Publish to PyPI
39+
uses: pypa/gh-action-pypi-publish@master
40+
with:
41+
user: __token__
42+
password: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)