@@ -129,7 +129,7 @@ jobs:
129129 fail-fast : false
130130 name : Build - ${{ matrix.os }} - ${{ matrix.target }}
131131 runs-on : ${{ matrix.os }}
132- if : github.ref == 'refs/heads/master'
132+ if : ( github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags/v')
133133 defaults :
134134 run :
135135 shell : bash
@@ -236,7 +236,7 @@ jobs:
236236 name : Python Package (up_aries)
237237 needs : [build]
238238 runs-on : ubuntu-latest
239- if : github.ref == 'refs/heads/master'
239+ if : ( github.ref == 'refs/heads/master') || startsWith(github.ref, 'refs/tags/v')
240240 steps :
241241 - uses : actions/checkout@v3
242242 - name : Retrieve git tags # need full git history to determine version number when packaging
@@ -294,3 +294,28 @@ jobs:
294294 up-aries_windows_amd64.exe
295295 up-aries_windows_arm64.exe
296296 up_aries.tar.gz
297+
298+ release : # If on a "v*" tag, cut a new non-draft release
299+ name : Release
300+ runs-on : ubuntu-latest
301+ if : startsWith(github.ref, 'refs/tags/v')
302+ needs : [ tests, build, package-python ]
303+ steps :
304+ - name : Download artifact
305+ uses : actions/download-artifact@v2
306+
307+ - name : Display artifacts
308+ run : ls -R
309+
310+ - uses : marvinpinto/action-automatic-releases@latest
311+ with :
312+ repo_token : " ${{ secrets.GITHUB_TOKEN }}"
313+ prerelease : false
314+ title : " ${{ github.ref_name }}"
315+ files : |
316+ up-aries_linux_amd64
317+ up-aries_macos_amd64
318+ up-aries_macos_arm64
319+ up-aries_windows_amd64.exe
320+ up-aries_windows_arm64.exe
321+ up_aries.tar.gz
0 commit comments