Skip to content

Commit 3b5f012

Browse files
committed
CFR: Publish self-contained application bundle to GH Workflow Artifacts
1 parent 8a977d6 commit 3b5f012

File tree

3 files changed

+68
-0
lines changed

3 files changed

+68
-0
lines changed

.github/workflows/release-app.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Stage PyInstaller application packages through GitHub Actions (GHA) to GitHub Workflow Artifacts section.
2+
# https://github.com/actions/upload-artifact#where-does-the-upload-go
3+
name: "Release: Application Bundle"
4+
5+
on:
6+
pull_request: ~
7+
push:
8+
tags:
9+
- '*.*.*'
10+
11+
jobs:
12+
13+
cfr:
14+
name: "CFR for OS ${{ matrix.os }}"
15+
16+
runs-on: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [
21+
"macos-13", # Intel
22+
"macos-latest", # ARM
23+
"ubuntu-latest", # Intel
24+
"windows-latest", # Intel
25+
]
26+
27+
steps:
28+
29+
- name: Acquire sources
30+
uses: actions/checkout@v4
31+
32+
- name: Set up Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: '3.12'
36+
cache: 'pip'
37+
cache-dependency-path: 'pyproject.toml'
38+
39+
- name: Set up project
40+
run: pip install --use-pep517 --prefer-binary --editable='.[cfr,release-cfr]'
41+
42+
- name: Build application bundle
43+
run: poe build-cfr
44+
45+
- name: Compute artifact suffix (OS-ARCH)
46+
id: artifact-suffix
47+
uses: ASzc/change-string-case-action@v6
48+
with:
49+
string: "${{ runner.os }}-${{ runner.arch }}"
50+
51+
- name: Upload artifact for Linux and macOS
52+
if: runner.os != 'Windows'
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: "cratedb-cfr-${{ steps.artifact-suffix.outputs.lowercase }}"
56+
path: dist/cratedb-cfr
57+
58+
- name: Upload artifact for Windows
59+
if: runner.os == 'Windows'
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: "cratedb-cfr-${{ steps.artifact-suffix.outputs.lowercase }}"
63+
path: dist/cratedb-cfr.exe
64+
65+
# TODO: Upload to release assets or GitHub Pages, when invoked on "tag" event.
66+
#if: startsWith(github.event.ref, 'refs/tags')

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- SQLAlchemy: Clean up and refactor SQLAlchemy polyfills
99
to `cratedb_toolkit.util.sqlalchemy`
1010
- CFR: Build as a self-contained program using PyInstaller
11+
- CFR: Publish self-contained application bundle to GitHub Workflow Artifacts
1112

1213
## 2024/06/18 v0.0.14
1314
- Add `ctk cfr` and `ctk wtf` diagnostics programs

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ release = [
168168
"twine<6",
169169
]
170170
release-cfr = [
171+
"poethepoet<0.28",
171172
"pyinstaller<7",
172173
]
173174
service = [

0 commit comments

Comments
 (0)