-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CFR: Publish self-contained application bundle to GH Workflow Artifacts
- Loading branch information
Showing
3 changed files
with
68 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,66 @@ | ||
# Stage PyInstaller application packages through GitHub Actions (GHA) to GitHub Workflow Artifacts section. | ||
# https://github.com/actions/upload-artifact#where-does-the-upload-go | ||
name: "Release: Application Bundle" | ||
|
||
on: | ||
pull_request: ~ | ||
push: | ||
tags: | ||
- '*.*.*' | ||
|
||
jobs: | ||
|
||
cfr: | ||
name: "CFR for OS ${{ matrix.os }}" | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ | ||
"macos-13", # Intel | ||
"macos-latest", # ARM | ||
"ubuntu-latest", # Intel | ||
"windows-latest", # Intel | ||
] | ||
|
||
steps: | ||
|
||
- name: Acquire sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
cache: 'pip' | ||
cache-dependency-path: 'pyproject.toml' | ||
|
||
- name: Set up project | ||
run: pip install --use-pep517 --prefer-binary --editable='.[cfr,release-cfr]' | ||
|
||
- name: Build application bundle | ||
run: poe build-cfr | ||
|
||
- name: Compute artifact suffix (OS-ARCH) | ||
id: artifact-suffix | ||
uses: ASzc/change-string-case-action@v6 | ||
with: | ||
string: "${{ runner.os }}-${{ runner.arch }}" | ||
|
||
- name: Upload artifact for Linux and macOS | ||
if: runner.os != 'Windows' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: "cratedb-cfr-${{ steps.artifact-suffix.outputs.lowercase }}" | ||
path: dist/cratedb-cfr | ||
|
||
- name: Upload artifact for Windows | ||
if: runner.os == 'Windows' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: "cratedb-cfr-${{ steps.artifact-suffix.outputs.lowercase }}" | ||
path: dist/cratedb-cfr.exe | ||
|
||
# TODO: Upload to release assets or GitHub Pages, when invoked on "tag" event. | ||
#if: startsWith(github.event.ref, 'refs/tags') |
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
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 |
---|---|---|
|
@@ -168,6 +168,7 @@ release = [ | |
"twine<6", | ||
] | ||
release-cfr = [ | ||
"poethepoet<0.28", | ||
"pyinstaller<7", | ||
] | ||
service = [ | ||
|