-
Notifications
You must be signed in to change notification settings - Fork 46
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
db63726
commit 11f605b
Showing
1 changed file
with
59 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,59 @@ | ||
name: Build, Test and Publish Pyinstaller Binaries | ||
|
||
on: | ||
pull_request: | ||
workflow_call: | ||
inputs: | ||
is_production: | ||
required: true | ||
type: boolean | ||
|
||
jobs: | ||
build-python: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
python: ["3.12"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install poetry | ||
run: pipx install poetry | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
cache: "poetry" | ||
|
||
- name: Install dependencies | ||
run: poetry install --no-interaction | ||
|
||
- name: Install setuptools (3.12 only) | ||
if: matrix.python == '3.12' && matrix.os == 'windows-latest' | ||
run: poetry add setuptools | ||
|
||
- name: Build Executable (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
poetry run poe package_windows | ||
- name: Build Executable (Unix) | ||
if: matrix.os != 'windows-latest' | ||
run: | | ||
poetry run poe package_unix | ||
- name: Test Executable | ||
run: | | ||
ls -l dist | ||
./dist/algokit --help | ||
- name: Publish Executable | ||
if: ${{ github.event.inputs.is_production }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: algokit-cli-${{ matrix.os }}-py${{ matrix.python }} | ||
path: dist |