11name : Publish Python Package
22concurrency :
33 group : ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
4- cancel-in-progress : true
4+ cancel-in-progress : false
55
66on :
77 push :
@@ -20,15 +20,14 @@ jobs:
2020 environment :
2121 name : pypi
2222 url : https://pypi.org/p/multi_mst
23- steps :
24- - name : Setup Python
25- uses : actions/setup-python@v4
26- with :
27- python-version : 3.9
28-
29- - name : Install dependencies
23+ steps :
24+ - name : Extract version
25+ id : version
3026 run : |
31- pip install -U pyyaml
27+ TAG=${{ github.ref }}
28+ VERSION=${TAG#refs/tags/v}
29+ echo "version=$VERSION" >> $GITHUB_OUTPUT
30+ echo "tag=v$VERSION" >> $GITHUB_OUTPUT
3231
3332 - name : Download sdist
3433@@ -38,45 +37,21 @@ jobs:
3837 workflow_conclusion : success
3938 branch : main
4039 path : .
41-
42- - name : Extract version
43- id : version
44- run : |
45- TAG=${{ github.ref }}
46- VERSION=${TAG#refs/tags/v}
47- echo "version=$VERSION" >> $GITHUB_OUTPUT
48- echo "tag=v$VERSION" >> $GITHUB_OUTPUT
49-
40+
5041 - name : Move files to dist
5142 run : |
5243 mkdir dist
5344 mv sdist/* dist/
5445 if [[ ! -f dist/multi_mst-${{ steps.version.outputs.version }}.tar.gz ]] ; then exit 1; fi
55-
56- - name : Make github release
57- id : make_release
58- uses : actions/create-release@v1
59- env :
60- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
61- with :
62- draft : false
63- prerelease : false
64- release_name : " Version ${{ steps.version.outputs.version }}"
65- tag_name : ${{ steps.version.outputs.tag }}
66- body : " **Full Changelog**: https://github.com/vda-lab/multi_mst/commits/${{ steps.version.outputs.tag }}"
67-
68- - name : Upload source distribution
69- uses : actions/upload-release-asset@v1
70- env :
71- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72- with :
73- upload_url : ${{ steps.make_release.outputs.upload_url }}
74- asset_path : dist/multi_mst-${{ steps.version.outputs.version }}.tar.gz
75- asset_name : multi_mst-${{ steps.version.outputs.version }}.tar.gz
76- asset_content_type : application/gzip
7746
47+ - name : Create Github Release
48+ env :
49+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
50+ run : |
51+ gh release create -R vda-lab/multi_mst -t "Version ${{ steps.version.outputs.version }}" -n "**Full Changelog**: https://github.com/vda-lab/pyflasc/commits/${{ steps.version.outputs.tag }}" "${{ steps.version.outputs.tag }}" dist/*.tar.gz
52+
7853 - name : Publish package to (Test)PyPI
79548055 # Comment lines below to publish to PyPi instead of test PyPi
8156 # with:
82- # repository-url: https://test.pypi.org/legacy/
57+ # repository-url: https://test.pypi.org/legacy/
0 commit comments