Skip to content

Commit 0a461ee

Browse files
committed
Add release workflow
1 parent 597951e commit 0a461ee

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Lint
17+
id: lint
18+
run: |
19+
make pylint
20+
make mypy
21+
- name: Test
22+
id: test
23+
run: make test
24+
25+
- uses: act10ns/slack@v1
26+
with:
27+
status: ${{ job.status }}
28+
steps: ${{ toJson(steps) }}
29+
30+
release:
31+
needs: test
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Build
36+
id: build
37+
run: make build
38+
- name: Publish to PyPI
39+
id: publish
40+
uses: pypa/gh-action-pypi-publish@release/v1
41+
with:
42+
user: __token__
43+
password: ${{ secrets.PYPI_API_TOKEN }}
44+
45+
- uses: act10ns/slack@v1
46+
with:
47+
status: ${{ job.status }}
48+
steps: ${{ toJson(steps) }}

0 commit comments

Comments
 (0)