Skip to content

Commit 17942cd

Browse files
committed
Add release workflow to GitHub actions
1 parent 6054335 commit 17942cd

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

.github/workflows/build.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ jobs:
1616
build:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v3
19+
- name: Checkout code
20+
uses: actions/checkout@v3
2021
- name: Set up Python
2122
uses: actions/setup-python@v4
2223
with:
@@ -31,5 +32,5 @@ jobs:
3132
if: always()
3233
uses: actions/upload-artifact@v2
3334
with:
34-
name: dist
35+
name: distribution
3536
path: dist/

.github/workflows/publish.yml

+26-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,34 @@ on:
1313
- 'v*'
1414

1515
jobs:
16+
release:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v3
21+
- name: Create Release
22+
id: create_release
23+
uses: actions/create-release@v1
24+
env:
25+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
with:
27+
tag_name: ${{github.ref}}
28+
release_name: DwfPy Release ${{github.ref}}
29+
body: |
30+
This release is available via PyPI from https://pypi.org/project/dwfpy.
31+
32+
You can install the latest version of DwfPy by running
33+
34+
```
35+
pip install --upgrade dwfpy
36+
```
37+
draft: false
38+
prerelease: false
1639
publish:
1740
runs-on: ubuntu-latest
1841
steps:
19-
- uses: actions/checkout@v3
42+
- name: Checkout code
43+
uses: actions/checkout@v3
2044
- name: Set up Python
2145
uses: actions/setup-python@v4
2246
with:
@@ -25,7 +49,7 @@ jobs:
2549
run: pip install build twine
2650
- name: Build Package
2751
run: make build
28-
- name: Publish Package to PyPI
52+
- name: Publish package to PyPI
2953
uses: pypa/gh-action-pypi-publish@release/v1
3054
with:
3155
user: __token__

0 commit comments

Comments
 (0)