Skip to content

Commit 0746f5e

Browse files
authored
Test1 ghreport (#85)
* test github-report * update changelog * Prepare release github-report-v0.1.1
1 parent 9a20dca commit 0746f5e

File tree

4 files changed

+355
-44
lines changed

4 files changed

+355
-44
lines changed

.github/workflows/github-report-release.yml

Lines changed: 129 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,89 @@ jobs:
150150
151151
echo "path=${asset}" >> "$GITHUB_OUTPUT"
152152
153+
- name: Package release assets
154+
if: steps.state.outputs.release_exists == 'false'
155+
id: package
156+
run: |
157+
set -euo pipefail
158+
159+
release_dir="release-assets"
160+
installer_name="install-github-report.sh"
161+
guide_name="INSTALL.txt"
162+
bundle_name="github-report-install-${{ steps.version.outputs.version }}.tar.gz"
163+
checksums_name="github-report-${{ steps.version.outputs.version }}-SHA256SUMS.txt"
164+
165+
rm -rf "${release_dir}"
166+
mkdir -p "${release_dir}/bundle"
167+
168+
cp "${{ steps.asset.outputs.path }}" "${release_dir}/"
169+
cp "${installer_name}" "${release_dir}/${installer_name}"
170+
chmod 0755 "${release_dir}/${installer_name}"
171+
172+
python - "${release_dir}/${guide_name}" "${bundle_name}" "${{ steps.version.outputs.tag }}" <<'PY'
173+
import os
174+
import sys
175+
from pathlib import Path
176+
from textwrap import dedent
177+
178+
guide_path, bundle_name, tag = sys.argv[1:4]
179+
repository = os.environ["GITHUB_REPOSITORY"]
180+
181+
content = dedent(
182+
f"""
183+
github-report install guide
184+
=========================
185+
186+
Recommended install path: use the bundled install archive from this release.
187+
188+
1. Extract this archive.
189+
2. Open a terminal in the extracted folder.
190+
3. Run:
191+
192+
bash ./install-github-report.sh
193+
194+
What the installer does:
195+
- installs Python automatically when needed on macOS and Ubuntu/Debian-style Linux
196+
- installs the bundled github-report wheel
197+
- creates the github-report launcher in ~/.local/bin
198+
- verifies the installed version
199+
- explains how to create a GitHub account and token if you do not have one yet
200+
201+
If you want to install directly from the release page without extracting first:
202+
203+
curl -fsSLO https://github.com/{repository}/releases/download/{tag}/{bundle_name}
204+
tar -xzf {bundle_name}
205+
bash ./install-github-report.sh
206+
"""
207+
).lstrip()
208+
209+
Path(guide_path).write_text(content, encoding="utf-8")
210+
PY
211+
212+
cp "${release_dir}/${installer_name}" "${release_dir}/bundle/${installer_name}"
213+
cp "${release_dir}/${guide_name}" "${release_dir}/bundle/${guide_name}"
214+
cp "${{ steps.asset.outputs.path }}" "${release_dir}/bundle/"
215+
216+
tar -C "${release_dir}/bundle" -czf "${release_dir}/${bundle_name}" \
217+
"${installer_name}" \
218+
"${guide_name}" \
219+
"$(basename -- "${{ steps.asset.outputs.path }}")"
220+
221+
(
222+
cd "${release_dir}"
223+
shasum -a 256 \
224+
"$(basename -- "${{ steps.asset.outputs.path }}")" \
225+
"${installer_name}" \
226+
"${guide_name}" \
227+
"${bundle_name}" > "${checksums_name}"
228+
)
229+
230+
echo "wheel_path=${release_dir}/$(basename -- "${{ steps.asset.outputs.path }}")" >> "$GITHUB_OUTPUT"
231+
echo "installer_path=${release_dir}/${installer_name}" >> "$GITHUB_OUTPUT"
232+
echo "guide_path=${release_dir}/${guide_name}" >> "$GITHUB_OUTPUT"
233+
echo "bundle_path=${release_dir}/${bundle_name}" >> "$GITHUB_OUTPUT"
234+
echo "checksums_path=${release_dir}/${checksums_name}" >> "$GITHUB_OUTPUT"
235+
153236
- name: Generate release notes from changelog
154237
if: steps.state.outputs.release_exists == 'false'
155238
id: notes
@@ -159,6 +242,7 @@ jobs:
159242
import pathlib
160243
import re
161244
import sys
245+
from textwrap import dedent
162246
163247
tag = sys.argv[1]
164248
version = sys.argv[2]
@@ -189,7 +273,26 @@ jobs:
189273
if not notes_text:
190274
raise SystemExit(f"Changelog section for {tag} is empty")
191275
192-
pathlib.Path("release-notes.md").write_text(notes_text + "\n", encoding="utf-8")
276+
install_section = dedent(
277+
f"""
278+
## Install
279+
280+
Recommended: download the bundled install archive from this release and run:
281+
282+
```bash
283+
curl -fsSLO https://github.com/${{ github.repository }}/releases/download/{tag}/github-report-install-{version}.tar.gz
284+
tar -xzf github-report-install-{version}.tar.gz
285+
bash ./install-github-report.sh
286+
```
287+
288+
No git clone is required.
289+
"""
290+
).strip()
291+
292+
pathlib.Path("release-notes.md").write_text(
293+
notes_text + "\n\n" + install_section + "\n",
294+
encoding="utf-8",
295+
)
193296
PY
194297
echo "path=release-notes.md" >> "$GITHUB_OUTPUT"
195298
@@ -199,7 +302,12 @@ jobs:
199302
GH_TOKEN: ${{ github.token }}
200303
run: |
201304
set -euo pipefail
202-
gh release create "${{ steps.version.outputs.tag }}" "${{ steps.asset.outputs.path }}" \
305+
gh release create "${{ steps.version.outputs.tag }}" \
306+
"${{ steps.package.outputs.wheel_path }}" \
307+
"${{ steps.package.outputs.installer_path }}" \
308+
"${{ steps.package.outputs.guide_path }}" \
309+
"${{ steps.package.outputs.bundle_path }}" \
310+
"${{ steps.package.outputs.checksums_path }}" \
203311
--title "${{ steps.version.outputs.tag }}" \
204312
--notes-file "${{ steps.notes.outputs.path }}"
205313
@@ -214,7 +322,11 @@ jobs:
214322
--arg tag "${{ steps.version.outputs.tag }}" \
215323
--arg version "${{ steps.version.outputs.version }}" \
216324
--arg sha "${{ steps.revision.outputs.commit }}" \
217-
--arg asset "${{ steps.asset.outputs.path }}" \
325+
--arg wheel "${{ steps.package.outputs.wheel_path }}" \
326+
--arg installer "${{ steps.package.outputs.installer_path }}" \
327+
--arg guide "${{ steps.package.outputs.guide_path }}" \
328+
--arg bundle "${{ steps.package.outputs.bundle_path }}" \
329+
--arg checksums "${{ steps.package.outputs.checksums_path }}" \
218330
--arg run_id "${GITHUB_RUN_ID}" \
219331
--arg run_attempt "${GITHUB_RUN_ATTEMPT}" \
220332
--arg repository "${GITHUB_REPOSITORY}" \
@@ -226,7 +338,13 @@ jobs:
226338
tag: $tag,
227339
version: $version,
228340
sha: $sha,
229-
asset: $asset,
341+
assets: {
342+
wheel: $wheel,
343+
installer: $installer,
344+
guide: $guide,
345+
bundle: $bundle,
346+
checksums: $checksums
347+
},
230348
run_id: $run_id,
231349
run_attempt: $run_attempt,
232350
timestamp_utc: now | todate
@@ -253,4 +371,11 @@ jobs:
253371
echo "- Version: \`${{ steps.version.outputs.version }}\`"
254372
echo "- Commit: \`${{ steps.revision.outputs.commit }}\`"
255373
echo "- Release exists: \`${{ steps.state.outputs.release_exists }}\`"
374+
if [[ "${{ steps.state.outputs.release_exists }}" == "false" ]]; then
375+
echo "- Wheel asset: \`${{ steps.package.outputs.wheel_path }}\`"
376+
echo "- Installer asset: \`${{ steps.package.outputs.installer_path }}\`"
377+
echo "- Install guide asset: \`${{ steps.package.outputs.guide_path }}\`"
378+
echo "- Bundle asset: \`${{ steps.package.outputs.bundle_path }}\`"
379+
echo "- Checksums asset: \`${{ steps.package.outputs.checksums_path }}\`"
380+
fi
256381
} >> "$GITHUB_STEP_SUMMARY"

services/github-report/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ All notable changes to this project are tracked here. This changelog follows
1616

1717
## [Unreleased]
1818

19+
## [github-report-v0.1.1] - 2026-03-15
20+
21+
- improve installer guidance for Python setup, GitHub account/token creation, and post-install verification
22+
- publish installer, tarball, checksums, and install notes as release assets
1923
## [github-report-v0.1.0] - 2026-03-14
2024

2125
- first release

services/github-report/README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,37 @@ pip install -e ".[dev]"
6363

6464
## End-User Setup
6565

66-
For non-developer installs, use the setup script:
66+
No git clone is required.
67+
68+
Keep the installer in the service root, not under `src/`. It is an
69+
application/distribution artifact, not a Python package module.
70+
71+
Recommended for end users: download the bundled install archive from the
72+
matching GitHub Release and run it from the extracted folder:
6773

6874
```bash
69-
./setup-github-report.sh
75+
curl -fsSLO \
76+
https://github.com/nebius/nebius-ps-services/releases/download/github-report-v0.1.0/github-report-install-v0.1.0.tar.gz
77+
tar -xzf github-report-install-v0.1.0.tar.gz
78+
bash ./install-github-report.sh
7079
```
7180

72-
The script checks macOS/Linux prerequisites, verifies `GITHUB_TOKEN` or
73-
`GH_TOKEN`, downloads the latest published `github-report` wheel from GitHub
74-
Releases, installs it into a dedicated virtual environment, and creates a
75-
`~/.local/bin/github-report` launcher.
81+
The release also includes these assets:
82+
83+
- `github-report-install-<version>.tar.gz`: recommended bundle for end users
84+
- `install-github-report.sh`: standalone installer
85+
- `github_report-<version>-py3-none-any.whl`: wheel
86+
- `INSTALL.txt`: plain-language install guide
87+
- `github-report-<version>-SHA256SUMS.txt`: checksums
88+
89+
When the bundle already contains `install-github-report.sh` and the matching
90+
wheel, the installer uses that local wheel directly. If no bundled wheel is
91+
present, it falls back to downloading the latest published wheel from GitHub
92+
Releases. In both cases it installs into a dedicated virtual environment and
93+
creates a `~/.local/bin/github-report` launcher. If you do not already have a
94+
GitHub account or token, the installer also shows the signup link, the token
95+
creation link, the minimum token permissions, and copy-paste commands for
96+
setting `GITHUB_TOKEN`.
7697

7798
## Usage
7899

0 commit comments

Comments
 (0)