forked from sugaroidbot/sugaroid
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.31 KB
/
continuous.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
48
49
50
51
name: Continuous
on:
push:
branches:
- master
- main
jobs:
Wheel:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.x
- name: Build wheel
run: |
python -m pip install wheel twine
python setup.py bdist_wheel
echo SUGAROID_VERSION=`python -c "$(cat sugaroid/version.py| grep VERSION); print(VERSION)"` >> $GITHUB_ENV
- name: Upload artifact
uses: actions/upload-artifact@v1.0.0
with:
name: sugaroid-continuous-none-any-py3.whl
path: dist/
- name: Publish distribution 📦 to Test PyPI
if: startsWith(github.ref, 'refs/tags/v')
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: twine upload dist/* | true
- uses: actions/download-artifact@v1
with:
name: sugaroid-continuous-none-any-py3.whl
- name: Release
uses: marvinpinto/action-automatic-releases@latest
with:
automatic_release_tag: ${{ env.SUGAROID_VERSION }}
prerelease: false
draft: false
title: ${{ env.SUGAROID_VERSION }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
files: |
sugaroid-continuous-none-any-py3.whl