-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniel Seichter
committed
Jun 9, 2024
1 parent
04cbc5d
commit ccff2e9
Showing
1 changed file
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: Build Binaries | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
|
||
build-windows-binary: | ||
runs-on: windows-latest | ||
steps: | ||
|
||
- name: 'Checkout' | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Create and start virtual environment | ||
run: | | ||
python3 -m venv venv | ||
venv\Scripts\activate.bat | ||
- name: Install dependencies | ||
run: pip install -r src/requirements.txt | ||
|
||
- name: Build Windows binary | ||
run: pyinstaller --onefile -w src/githubissueclient.py -n githubissueclient-windows-${{ github.ref_name }}.exe | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: githubissueclient-windows-${{ github.ref_name }}.exe | ||
path: dist/githubissueclient-windows-${{ github.ref_name }}.exe | ||
|
||
build-linux-binary: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: 'Checkout' | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: sudo apt-get install build-essential libgtk-3-dev | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Create and start virtual environment | ||
run: | | ||
python3 -m venv venv | ||
source venv/bin/activate | ||
- name: Install dependencies | ||
run: pip install -r src/requirements.txt | ||
|
||
- name: Build Linux binary | ||
run: pyinstaller --onefile src/githubissueclient.py -n githubissueclient-linux-${{ github.ref_name }} | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: githubissueclient-linux-${{ github.ref_name }} | ||
path: dist/githubissueclient-linux-${{ github.ref_name }} | ||
|
||
deploy: | ||
runs-on: ubuntu-latest | ||
needs: [build-windows-binary, build-linux-binary] | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: githubissueclient-linux-${{ github.ref_name }} | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: githubissueclient-windows-${{ github.ref_name }}.exe | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: ${{ github.ref_name }} | ||
name: Release ${{ github.ref_name }} | ||
draft: false | ||
prerelease: false | ||
generate_release_notes: true | ||
files: | | ||
githubissueclient-linux-${{ github.ref_name }} | ||
githubissueclient-windows-${{ github.ref_name }}.exe |