Skip to content

Commit b07417d

Browse files
committed
Ignore PR into master branch for releases
Signed-off-by: Sylvain Hellegouarch <sh@defuze.org>
1 parent 0ad7fdd commit b07417d

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/release.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
3+
on:
4+
pull_request:
5+
branches-ignore:
6+
- 'master'
7+
push:
8+
tags:
9+
- '[0-9]+.[0-9]+.[0-9]+'
10+
- '[0-9]+.[0-9]+.[0-9]+rc[0-9]+'
11+
12+
jobs:
13+
release-to-pypi:
14+
runs-on: ubuntu-16.04
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: '3.5'
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
- name: Build and publish
26+
env:
27+
TWINE_USERNAME: chaostoolkit
28+
TWINE_PASSWORD: ${{ secrets.PYPI_PWD }}
29+
run: |
30+
python3 setup.py release
31+
twine upload dist/*
32+
# push artifacts for other jobs to use
33+
- name: Upload packages as artifacts
34+
uses: actions/upload-artifact@v2-preview
35+
with:
36+
name: chaostoolkit-packages
37+
path: dist/chaostoolkit-lib-*

0 commit comments

Comments
 (0)