File tree Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Expand file tree Collapse file tree 2 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 1313 tags : ["v*"]
1414
1515permissions :
16- contents : read
16+ contents : write
1717
1818jobs :
1919 # first get the list of distros to build for.
6262 with :
6363 name : python-dist
6464 path : dist/*
65+
66+ # if it's a tag, create a release and attach the artifacts to it
67+ attach-assets :
68+ name : " Attach assets to release"
69+ if : startsWith(github.ref, 'refs/tags/')
70+ needs :
71+ - build-debs
72+ - build-sdist
73+ runs-on : ubuntu-latest
74+ steps :
75+ - name : Download all workflow run artifacts
76+ uses : actions/download-artifact@v2
77+ - name : Build a tarball for the debs
78+ run : tar -cvJf debs.tar.xz debs
79+ - name : Attach to release
80+ uses : softprops/action-gh-release@a929a66f232c1b11af63782948aa2210f981808a # PR#109
81+ env :
82+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
83+ with :
84+ files : |
85+ python-dist/*
86+ debs.tar.xz
87+ # if it's not already published, keep the release as a draft.
88+ draft : true
89+ # mark it as a prerelease if the tag contains 'rc'.
90+ prerelease : ${{ contains(github.ref, 'rc') }}
Original file line number Diff line number Diff line change 1+ Add Github Actions workflow to attach release artifacts to release.
You can’t perform that action at this time.
0 commit comments