@@ -20,13 +20,13 @@ jobs:
2020 runs-on : ubuntu-latest
2121
2222 steps :
23- - uses : actions/checkout@v2
23+ - uses : actions/checkout@v3
2424 - run : git fetch --depth=1 origin +refs/tags/*:refs/tags/*
2525 if : github.event_name == 'push'
2626 - name : Set up Python
27- uses : actions/setup-python@v2
27+ uses : actions/setup-python@v3
2828 with :
29- python-version : ' 3.x '
29+ python-version : ' 3.10 '
3030 - name : Install dependencies
3131 id : set-version
3232 run : |
@@ -35,38 +35,26 @@ jobs:
3535 [ $GITHUB_EVENT_NAME == 'push' ] && VERSION+=b && VERSION+=$(($(git tag -l "*$VERSION*" | cut -db -f2 | sort -n | tail -1)+1))
3636 sed -ie "s/version = .*/version = $VERSION/" setup.cfg
3737 python -m pip install --upgrade pip
38+ pip install -r requirements.txt
3839 pip install build
3940 echo ::set-output name=version::$VERSION
4041 NAME="django_iris"-${VERSION}-py3-none-any
4142 echo ::set-output name=name::$NAME
4243 - name : Build package
43- run : python -m build
44+ run : ./scripts/ build-dist.sh
4445 - name : Publish package
45- uses : pypa/gh-action-pypi-publish@release/v1.5
46+ uses : pypa/gh-action-pypi-publish@release/v1
4647 with :
4748 user : __token__
4849 password : ${{ secrets.PYPI_API_TOKEN }}
4950 - name : Create Beta Release
5051 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
5553 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 }}
5855 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
7058 if : github.event_name == 'release'
7159 with :
7260 ref : main
0 commit comments