Skip to content

Commit 82b1780

Browse files
authored
cd: Add automated release process (#143)
1 parent 03e9bd3 commit 82b1780

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/release.yml

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
upload_url: ${{ steps.create_release.outputs.upload_url }}
13+
14+
steps:
15+
- name: Create Release
16+
id: create_release
17+
uses: actions/create-release@v1
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
with:
21+
tag_name: ${{ github.ref }}
22+
release_name: ${{ github.ref }}
23+
draft: true
24+
prerelease: false
25+
body: |
26+
This is the ${{ github.ref }} release of the sysdig-sdk-python (sdcclient), the Python client for Sysdig Platform
27+
28+
### Major Changes
29+
30+
### Minor Changes
31+
32+
### Bug fixes
33+
34+
pypi:
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- uses: actions/checkout@v2
39+
40+
- name: Set up Python
41+
uses: actions/setup-python@v2
42+
with:
43+
python-version: 3.8
44+
45+
- name: Install dependencies
46+
run: |
47+
python -m pip install --upgrade pip
48+
pip install setuptools wheel twine
49+
50+
- name: Build and publish
51+
env:
52+
TWINE_USERNAME: ${{ secrets.PYPI_USER }}
53+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
54+
run: |
55+
python setup.py sdist bdist_wheel
56+
twine upload dist/*

0 commit comments

Comments
 (0)