@@ -20,13 +20,13 @@ jobs:
20
20
runs-on : ubuntu-latest
21
21
22
22
steps :
23
- - uses : actions/checkout@v2
23
+ - uses : actions/checkout@v3
24
24
- run : git fetch --depth=1 origin +refs/tags/*:refs/tags/*
25
25
if : github.event_name == 'push'
26
26
- name : Set up Python
27
- uses : actions/setup-python@v2
27
+ uses : actions/setup-python@v3
28
28
with :
29
- python-version : ' 3.x '
29
+ python-version : ' 3.10 '
30
30
- name : Install dependencies
31
31
id : set-version
32
32
run : |
@@ -35,38 +35,26 @@ jobs:
35
35
[ $GITHUB_EVENT_NAME == 'push' ] && VERSION+=b && VERSION+=$(($(git tag -l "*$VERSION*" | cut -db -f2 | sort -n | tail -1)+1))
36
36
sed -ie "s/version = .*/version = $VERSION/" setup.cfg
37
37
python -m pip install --upgrade pip
38
+ pip install -r requirements.txt
38
39
pip install build
39
40
echo ::set-output name=version::$VERSION
40
41
NAME="django_iris"-${VERSION}-py3-none-any
41
42
echo ::set-output name=name::$NAME
42
43
- name : Build package
43
- run : python -m build
44
+ run : ./scripts/ build-dist.sh
44
45
- name : Publish package
45
- uses : pypa/gh-action-pypi-publish@release/v1.5
46
+ uses : pypa/gh-action-pypi-publish@release/v1
46
47
with :
47
48
user : __token__
48
49
password : ${{ secrets.PYPI_API_TOKEN }}
49
50
- name : Create Beta Release
50
51
id : create_release
51
- if : github.event_name == 'push'
52
- uses : actions/create-release@v1
53
- env :
54
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
52
+ uses : softprops/action-gh-release@v1
55
53
with :
56
- tag_name : ${{ steps.set-version.outputs.version }}
57
- release_name : ${{ steps.set-version.outputs.version }}
54
+ tag_name : v${{ steps.set-version.outputs.version }}
58
55
prerelease : ${{ github.event_name != 'release' }}
59
- - name : Upload Release Asset
60
- id : upload-release-asset
61
- uses : actions/upload-release-asset@v1
62
- env :
63
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
64
- with :
65
- upload_url : ${{ github.event_name == 'release' && github.event.release.upload_url || steps.create_release.outputs.upload_url }}
66
- asset_path : dist/${{ steps.set-version.outputs.name }}.whl
67
- asset_name : ${{ steps.set-version.outputs.name }}.whl
68
- asset_content_type : application/zip
69
- - uses : actions/checkout@v2
56
+ files : dist/${{ steps.set-version.outputs.name }}.whl
57
+ - uses : actions/checkout@v3
70
58
if : github.event_name == 'release'
71
59
with :
72
60
ref : main
0 commit comments