-
Notifications
You must be signed in to change notification settings - Fork 17
44 lines (42 loc) · 1.27 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Release
on:
push:
branches:
- master
paths:
- 'electricpy/version.py'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# https://github.com/marketplace/actions/setup-python
# ^-- This gives info on matrix testing.
- name: Install Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Identify Version
id: version
run: |
python -m pip install requests build --user
python -m pip install -r requirements.txt --user
output=$(python release-version.py)
echo "::set-output name=version::$output"
- name: Build Artifacts
if: success()
id: build
run: |
python -m build --sdist --wheel --outdir dist/
- name: Create Release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.version.outputs.version }}
name: Release ${{ steps.version.outputs.version }}
body: ${{ steps.tag_version.outputs.changelog }}
artifacts: "dist/*"
- name: Publish distribution 📦 to PyPI
if: success()
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}