Skip to content

Commit

Permalink
Add release workflow to GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusgreuel committed Aug 8, 2022
1 parent 6054335 commit 17942cd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -31,5 +32,5 @@ jobs:
if: always()
uses: actions/upload-artifact@v2
with:
name: dist
name: distribution
path: dist/
28 changes: 26 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,34 @@ on:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
tag_name: ${{github.ref}}
release_name: DwfPy Release ${{github.ref}}
body: |
This release is available via PyPI from https://pypi.org/project/dwfpy.
You can install the latest version of DwfPy by running
```
pip install --upgrade dwfpy
```
draft: false
prerelease: false
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -25,7 +49,7 @@ jobs:
run: pip install build twine
- name: Build Package
run: make build
- name: Publish Package to PyPI
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand Down

0 comments on commit 17942cd

Please sign in to comment.