@@ -10,16 +10,31 @@ jobs:
1010 runs-on : ubuntu-latest
1111 steps :
1212 - name : Checkout code
13- uses : actions/checkout@v2
13+ uses : actions/checkout@v3
1414
1515 - name : Set up Python
16- uses : actions/setup-python@v2
16+ uses : actions/setup-python@v4
1717 with :
18- python-version : 3.10
18+ python-version : " 3.11 "
1919
2020 - name : Install Poetry
21- run : |
22- curl -sSL https://install.python-poetry.org | python3 -
21+ uses : snok/install-poetry@v1
22+ with :
23+ version : 2.1.1
24+ virtualenvs-create : true
25+ virtualenvs-in-project : true
26+
27+ - name : Setup Poetry cache
28+ uses : actions/cache@v3
29+ with :
30+ path : |
31+ ~/.cache/pypoetry
32+ ~/.cache/pip
33+ .venv
34+ key : ${{ runner.os }}-poetry-release-${{ hashFiles('**/poetry.lock') }}
35+ restore-keys : |
36+ ${{ runner.os }}-poetry-release-
37+ ${{ runner.os }}-poetry-
2338
2439 - name : Build package
2540 run : |
3752 prerelease : false
3853 - name : Extract version
3954 id : get_version
40- run : echo "::set-output name= version::$(python -c 'import calmlib; print(calmlib.__version__)')"
55+ run : echo "version=$(poetry version -s)" >> $GITHUB_OUTPUT
4156
4257 - name : Upload Release Asset
4358 id : upload-release-asset
@@ -46,13 +61,12 @@ jobs:
4661 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4762 with :
4863 upload_url : ${{ steps.create_release.outputs.upload_url }}
49- asset_path : ./dist/calmlib -${{ steps.get_version.outputs.version }}.tar.gz
50- asset_name : calmlib -${{ steps.get_version.outputs.version }}.tar.gz
64+ asset_path : ./dist/botspot -${{ steps.get_version.outputs.version }}.tar.gz
65+ asset_name : botspot -${{ steps.get_version.outputs.version }}.tar.gz
5166 asset_content_type : application/gzip
5267
5368 - name : Publish package
54- uses : pypa/gh-action-pypi-publish@master
69+ uses : pypa/gh-action-pypi-publish@release/v1
5570 with :
56- user : __token__
5771 password : ${{ secrets.PYPI_TOKEN }}
5872
0 commit comments