Skip to content

Commit

Permalink
Actions: Add release actions
Browse files Browse the repository at this point in the history
For releasing binaries. Triggers when a release is created.

Signed-off-by: kingbri <[email protected]>
  • Loading branch information
kingbri1 committed May 1, 2024
1 parent c21c6b7 commit 7469b8d
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload Linux release binaries

on:
release:
types:
- created

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Deps
run: |
pip install .[pyinstaller]
- name: Build Executable
run: |
pyinstaller --onefile async-hf-downloader/download.py -n async-hf-downloader-linux
- name: Upload Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/async-hf-downloader-linux
26 changes: 26 additions & 0 deletions .github/workflows/release-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload Mac release binaries

on:
release:
types:
- created

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Deps
run: |
pip install .[pyinstaller]
- name: Build Executable
run: |
pyinstaller --onefile async-hf-downloader/download.py -n async-hf-downloader-darwin
- name: Upload Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/async-hf-downloader-darwin
26 changes: 26 additions & 0 deletions .github/workflows/release-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload Windows release binaries

on:
release:
types:
- created

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Deps
run: |
pip install .[pyinstaller]
- name: Build Executable
run: |
pyinstaller --onefile async-hf-downloader/download.py -n async-hf-downloader-win
- name: Upload Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/async-hf-downloader-win.exe

0 comments on commit 7469b8d

Please sign in to comment.