-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (57 loc) · 1.67 KB
/
autorelease-prep.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: "Autorelease"
on:
pull_request:
branches:
- stable
defaults:
run:
shell: bash
jobs:
deploy_testpypi:
runs-on: ubuntu-latest
name: "Deployment test"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- run: | # TODO: move this to an action
source ./.github/workflows/autorelease-default-env.sh
if [ -f "autorelease-env.sh" ]; then
cat autorelease-env.sh >> $GITHUB_ENV
fi
eval $INSTALL_AUTORELEASE
name: "Install autorelease"
- run: |
python -m pip install twine wheel
name: "Install release tools"
- run: |
bump-dev-version
python setup.py --version
name: "Bump testpypi dev version"
- run: |
python setup.py sdist bdist_wheel
twine check dist/*
name: "Build and check package"
- uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.testpypi_password }}
repository_url: https://test.pypi.org/legacy/
name: "Deploy to testpypi"
test_testpypi:
runs-on: ubuntu-latest
name: "Test deployed"
needs: deploy_testpypi
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.x"
- run: | # TODO: move this to an action
source ./.github/workflows/autorelease-default-env.sh
if [ -f "autorelease-env.sh" ]; then
cat autorelease-env.sh >> $GITHUB_ENV
fi
eval $INSTALL_AUTORELEASE
name: "Install autorelease"
- run: test-testpypi