@@ -110,18 +110,12 @@ jobs:
110110 upload :
111111 name : upload
112112 needs : build
113+ permissions :
114+ contents : write
115+ actions : write
113116 runs-on : ubuntu-latest
114117 steps :
115118 - uses : actions/checkout@v2
116- - env :
117- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
118- id : create_release
119- uses : actions/create-release@v1
120- with :
121- draft : true
122- prerelease : true
123- release_name : ${{ github.ref }}
124- tag_name : ${{ github.ref }}
125119 - uses : actions/download-artifact@v4
126120 with :
127121 name : CellProfiler-Analyst-macOS-3.0.5.zip
@@ -132,17 +126,20 @@ jobs:
132126 path : ./
133127 - env :
134128 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
135- uses : actions/upload-release-asset@v1
129+ uses : softprops/action-gh-release@v2
130+ if : startsWith(github.ref, 'refs/tags/')
136131 with :
137- asset_content_type : application/zip
138- asset_name : CellProfiler-Analyst-macOS-3.0.5.zip
139- asset_path : /home/runner/work/CellProfiler-Analyst/CellProfiler-Analyst/CellProfiler-Analyst-macOS-3.0.5.zip
140- upload_url : ${{ steps.create_release.outputs.upload_url }}
141- - env :
142- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
143- uses : actions/upload-release-asset@v1
132+ draft : true
133+ prerelease : true
134+ name : 3.0.5
135+ files : |
136+ /home/runner/work/CellProfiler-Analyst/CellProfiler-Analyst/CellProfiler-Analyst-macOS-3.0.5.zip
137+ /home/runner/work/CellProfiler-Analyst/CellProfiler-Analyst/CellProfiler-Analyst-Windows-3.0.5.exe
138+ # artifacts attached to the action no long necessary
139+ # since they have been uploaded to releases
140+ - uses : geekyeggo/delete-artifact@v4
141+ id : delete-artifacts
144142 with :
145- asset_content_type : application/exe
146- asset_name : CellProfiler-Analyst-Windows-3.0.5.exe
147- asset_path : /home/runner/work/CellProfiler-Analyst/CellProfiler-Analyst/CellProfiler-Analyst-Windows-3.0.5.exe
148- upload_url : ${{ steps.create_release.outputs.upload_url }}
143+ name : |
144+ CellProfiler-Analyst-macOS-3.0.5.zip
145+ CellProfiler-Analyst-Windows-3.0.5.exe
0 commit comments