Skip to content

Commit 21da7e1

Browse files
authored
Merge pull request #280 from tableau/jac/release-action
Auto-trigger build and upload binaries when a release is created
2 parents e2a6879 + 0d1e513 commit 21da7e1

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/package.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ name: Release-Executable
99
# https://anshumanfauzdar.medium.com/using-github-actions-to-bundle-python-application-into-a-single-package-and-automatic-release-834bd42e0670
1010

1111
on:
12-
release:
13-
types: [published]
12+
push:
13+
tags:
14+
- '*'
1415
workflow_dispatch:
1516

1617
jobs:
@@ -94,10 +95,20 @@ jobs:
9495
with:
9596
name: ${{ matrix.OUT_FILE_NAME }}
9697
path: ./dist/${{ matrix.TARGET }}/${{ matrix.OUT_FILE_NAME }}
97-
98+
9899
- name: Upload artifact for Mac
99100
if: matrix.TARGET == 'macos'
100101
uses: actions/upload-artifact@v4
101102
with:
102103
name: ${{ matrix.BUNDLE_NAME }}
103104
path: ./dist/${{ matrix.TARGET }}/${{ matrix.BUNDLE_NAME }}.tar
105+
106+
- name: Upload binaries to release
107+
uses: svenstaro/upload-release-action@v2
108+
with:
109+
repo_token: ${{ secrets.GITHUB_TOKEN }}
110+
file: ./dist/${{ matrix.TARGET }}/${{ matrix.OUT_FILE_NAME }}/
111+
tag: ${{ github.ref_name }}
112+
overwrite: true
113+
promote: true
114+

0 commit comments

Comments
 (0)