-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (40 loc) · 1.14 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: Release
on:
create
jobs:
release:
name: Pypi
runs-on: ubuntu-latest
if: github.event.ref_type == 'tag'
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and Publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
RELEASE_VERSION: ${{ github.event.ref }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Create Github Release
uses: Roang-zero1/github-create-release-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
created_tag: ${{ github.event.ref }}
- name: Update Release with Artifacts
uses: ncipollo/[email protected]
with:
allowUpdates: true
tag: ${{ github.event.ref }}
artifacts: "dist/*"
token: ${{ secrets.GITHUB_TOKEN }}