Skip to content

Commit 3cc31ab

Browse files
committed
Added release workflow.
1 parent e582eee commit 3cc31ab

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*'
7+
8+
jobs:
9+
10+
job_release:
11+
name: Create Release and Upload to PyPI
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Get tag
15+
id: tag
16+
run: |
17+
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
18+
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
- name: Set up Python 3.10
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: '3.10'
26+
27+
- name: Build
28+
id: build
29+
run: |
30+
python setup.py build sdist bdist_wheel
31+
32+
- name: Create Release
33+
uses: "marvinpinto/action-automatic-releases@latest"
34+
with:
35+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
36+
automatic_release_tag: ${{ steps.tag.outputs.tag }}
37+
prerelease: false
38+
draft: true
39+
files: |
40+
dist/*
41+
42+
- name: Publish to PyPI
43+
uses: pypa/gh-action-pypi-publish@release/v1
44+
with:
45+
user: __token__
46+
password: ${{ secrets.PYPI_TOKEN }}
47+
verbose: true

0 commit comments

Comments
 (0)