@@ -30,11 +30,47 @@ jobs:
3030 python -m pip install --upgrade pip
3131 pip install hatch python-semantic-release[github]
3232
33+ - name : Get tag version
34+ id : get_version
35+ run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
36+
37+ - name : Build package
38+ run : hatch build
39+
3340 - name : Create GitHub Release
41+ id : create_release
42+ uses : actions/create-release@v1
3443 env :
3544 GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
36- run : |
37- semantic-release publish
45+ with :
46+ tag_name : ${{ steps.get_version.outputs.VERSION }}
47+ release_name : Release ${{ steps.get_version.outputs.VERSION }}
48+ body : |
49+ ## Release ${{ steps.get_version.outputs.VERSION }}
50+
51+ This is an automated release created from tag ${{ steps.get_version.outputs.VERSION }}.
52+ draft : false
53+ prerelease : false
54+
55+ - name : Upload Release Assets
56+ uses : actions/upload-release-asset@v1
57+ env :
58+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
59+ with :
60+ upload_url : ${{ steps.create_release.outputs.upload_url }}
61+ asset_path : ./dist/*.whl
62+ asset_name : martor-${{ steps.get_version.outputs.VERSION }}-py3-none-any.whl
63+ asset_content_type : application/octet-stream
64+
65+ - name : Upload Source Distribution
66+ uses : actions/upload-release-asset@v1
67+ env :
68+ GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
69+ with :
70+ upload_url : ${{ steps.create_release.outputs.upload_url }}
71+ asset_path : ./dist/*.tar.gz
72+ asset_name : martor-${{ steps.get_version.outputs.VERSION }}.tar.gz
73+ asset_content_type : application/gzip
3874
3975 upload-to-pypi :
4076 runs-on : ubuntu-latest
0 commit comments