Skip to content

Commit 233f0d4

Browse files
committed
add github actions
1 parent abe9488 commit 233f0d4

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/release.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
release:
10+
name: "Publish release"
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- uses: "actions/checkout@v2"
15+
- uses: "actions/setup-python@v1"
16+
with:
17+
python-version: 3.9
18+
- name: "Install dependencies"
19+
run: "pip install -r requirements/dev-requirements.txt"
20+
- name: "Publish to PyPI"
21+
run: "./scripts/release.sh"
22+
env:
23+
TWINE_USERNAME: __token__
24+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

scripts/release.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
rm -rf ./build/*
3+
rm -rf ./dist/*
4+
python setup.py sdist bdist_wheel
5+
twine upload dist/*

0 commit comments

Comments
 (0)