-
Notifications
You must be signed in to change notification settings - Fork 14
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
1 parent
a0667d8
commit 50b802a
Showing
1 changed file
with
113 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,113 @@ | ||
name: Compile and publish binaries | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
macOS: | ||
name: Build OSX binaries | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: releases-source | ||
|
||
- name: Set up Python 3 | ||
run: brew install python3 | ||
|
||
- name: Install dependencies | ||
run: pip3 install -r requirements.txt | ||
|
||
- name: Install pyinstaller | ||
run: pip3 install pyinstaller | ||
|
||
- name: Build binaries for OSX | ||
run: pyinstaller main.py --onefile --name ocsysinfo_osx_x86_64 --paths=./src --target-architecture x86_64 | ||
|
||
- name: Upload to Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Artifacts OSX | ||
path: dist/ocsysinfo_osx_x86_64 | ||
|
||
- name: Upload to Release | ||
if: github.event_name == 'release' | ||
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: dist/ocsysinfo_osx_* | ||
tag: ${{ github.ref }} | ||
file_glob: true | ||
|
||
windows: | ||
name: Build Windows binaries | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: releases-source | ||
|
||
- name: Set up Python 3 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install dependencies | ||
run: pip3 install -r requirements.txt | ||
|
||
- name: Install pyinstaller | ||
run: pip3 install pyinstaller | ||
|
||
- name: Build binaries for Windows | ||
run: pyinstaller main.py --onefile --name ocsysinfo_win --paths=./src | ||
|
||
- name: Upload to Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Artifacts Windows | ||
path: dist/ocsysinfo_win* | ||
|
||
- name: Upload to Release | ||
if: github.event_name == 'release' | ||
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: dist/ocsysinfo_win* | ||
tag: ${{ github.ref }} | ||
file_glob: true | ||
|
||
linux_x64: | ||
name: Build Linux x86_64 binaries | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: releases-source | ||
|
||
- name: Install python3 and pip3 | ||
run: sudo apt-get install python3 python3-pip | ||
|
||
- name: Install dependencies | ||
run: pip3 install -r requirements.txt | ||
|
||
- name: Install pyinstaller | ||
run: pip3 install pyinstaller | ||
|
||
- name: Build binaries for Linux, x86_64 architecture | ||
run: pyinstaller main.py --onefile --name ocsysinfo_linux_x86_64 --paths=./src | ||
|
||
- name: Upload to Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Artifacts Linux ARM64 | ||
path: dist/ocsysinfo_linux_x86_64 | ||
|
||
- name: Upload to Release | ||
if: github.event_name == 'release' | ||
uses: svenstaro/upload-release-action@e74ff71f7d8a4c4745b560a485cc5fdb9b5b999d | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: dist/ocsysinfo_linux_x86_64 | ||
tag: ${{ github.ref }} | ||
file_glob: true |