-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (50 loc) · 1.47 KB
/
deploy-pypi.yml
File metadata and controls
58 lines (50 loc) · 1.47 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Build & Test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt-get install libusb-1.0-0-dev
python -m pip install --upgrade pip
pip install setuptools twine pip wheel
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Upload To PyPi
env:
PYPI_RC: ${{ secrets.PYPI_RC }}
run: |
echo "${PYPI_RC}" > ~/.pypirc
./scripts/deploy-pypi.sh
- name: Prep Release
id: prep
run: |
# Parse version
VERSION=$(./scripts/get_version.sh)
echo "Setting release version to $VERSION"
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
# Parse changelog
CHANGELOG=$(cat CHANGELOG.md)
echo "Got changelog: $CHANGELOG"
echo "::set-output name=changelog::$CHANGELOG"
- name: Create Release
id: create_release
uses: actions/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: Release ${{ env.RELEASE_VERSION }}
body: ${{ steps.prep.outputs.changelog }}
draft: false
prerelease: true