Skip to content

Commit 2e1e898

Browse files
authored
Add GHA automated release from tag
1 parent 2c032d9 commit 2e1e898

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: "tagged-release"
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
tagged-release:
10+
name: "Tagged Release"
11+
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
28+
if [ -f requirements_dev.txt ]; then pip install -r requirements_dev.txt; fi
29+
- name: Lint with flake8
30+
run: |
31+
# stop the build if there are Python syntax errors or undefined names
32+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
34+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35+
- name: Test with pytest
36+
run: |
37+
pytest
38+
39+
- uses: "marvinpinto/action-automatic-releases@latest"
40+
with:
41+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
42+
prerelease: false
43+
files: |
44+
*

0 commit comments

Comments
 (0)