Skip to content

Commit

Permalink
Merge pull request #280 from tableau/jac/release-action
Browse files Browse the repository at this point in the history
Auto-trigger build and upload binaries when a release is created
  • Loading branch information
jacalata authored Dec 5, 2024
2 parents e2a6879 + 0d1e513 commit 21da7e1
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ name: Release-Executable
# https://anshumanfauzdar.medium.com/using-github-actions-to-bundle-python-application-into-a-single-package-and-automatic-release-834bd42e0670

on:
release:
types: [published]
push:
tags:
- '*'
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -94,10 +95,20 @@ jobs:
with:
name: ${{ matrix.OUT_FILE_NAME }}
path: ./dist/${{ matrix.TARGET }}/${{ matrix.OUT_FILE_NAME }}

- name: Upload artifact for Mac
if: matrix.TARGET == 'macos'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.BUNDLE_NAME }}
path: ./dist/${{ matrix.TARGET }}/${{ matrix.BUNDLE_NAME }}.tar

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./dist/${{ matrix.TARGET }}/${{ matrix.OUT_FILE_NAME }}/
tag: ${{ github.ref_name }}
overwrite: true
promote: true

0 comments on commit 21da7e1

Please sign in to comment.