-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (50 loc) · 1.52 KB
/
publish.yml
File metadata and controls
63 lines (50 loc) · 1.52 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
59
60
61
62
63
name: Publish
on:
push:
branches:
- 'releases/**'
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install setuptools and wheel first
run: pip3 install setuptools wheel
- name: Install dependencies (Python)
run: make update
- name: Build package
run: make build
- name: Test publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_test_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.pypi_password }}
- name: Fetch package version
run: echo "PACKAGE_VERSION=$(make version)" >> $GITHUB_ENV
- name: Build docs
run: make docs
- name: Deploy docs
uses: JamesIves/github-pages-deploy-action@4.1.3
with:
branch: gh-pages
folder: docs/_build/html
- name: Notify Slack channel
uses: fjogeleit/http-request-action@master
with:
url: ${{ secrets.SLACK_WEBHOOK_URL }}
method: 'POST'
data: '{"version": "${{ env.PACKAGE_VERSION }}"}'