Skip to content

Commit a357e8c

Browse files
committed
Document release publishing follow-up
1 parent 3ffba3c commit a357e8c

2 files changed

Lines changed: 82 additions & 1 deletion

File tree

docs/flathub.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ release, then update the Flathub manifest to the new release archive.
5656
5757
1. Finish the upstream release and confirm the GitHub release is not a draft.
5858
2. Confirm the release is suitable for Flathub stable, not a nightly snapshot.
59-
3. Build or download the release source archive and compute its SHA-256.
59+
3. Download the published release source archive and compute or confirm its
60+
SHA-256.
6061
4. In the Flathub repository, update the `mini-eq` module source to the new
6162
release URL and hash.
6263
5. If the screenshot changed, update the MetaInfo screenshot URL to a release
@@ -80,6 +81,27 @@ release, then update the Flathub manifest to the new release archive.
8081
15. If quality fixes landed, use the listing quality panel to request a
8182
re-review.
8283

84+
GitHub draft releases expose assets under temporary `untagged-*` URLs. Publish
85+
the upstream GitHub release first, then use the stable asset URL:
86+
87+
```bash
88+
curl -fsSL \
89+
https://github.com/bhack/mini-eq/releases/download/vX.Y.Z/mini_eq-X.Y.Z.tar.gz \
90+
| sha256sum
91+
```
92+
93+
The Flathub `master` branch is protected, so direct pushes are rejected. Push an
94+
update branch and open a PR:
95+
96+
```bash
97+
git switch -c update-X.Y.Z
98+
git push -u origin update-X.Y.Z
99+
gh pr create --repo flathub/io.github.bhack.mini-eq \
100+
--base master \
101+
--head update-X.Y.Z \
102+
--title 'Update mini-eq to X.Y.Z'
103+
```
104+
83105
## Validation
84106

85107
Run upstream AppStream and desktop-file validation:
@@ -104,6 +126,21 @@ flatpak run --command=flathub-build org.flatpak.Builder --install io.github.bhac
104126
flatpak run io.github.bhack.mini-eq --check-deps
105127
```
106128

129+
For a local source and full build check without installing the app:
130+
131+
```bash
132+
flatpak run --command=flatpak-builder org.flatpak.Builder \
133+
--force-clean \
134+
--download-only \
135+
--install-deps-from=flathub \
136+
build-dir io.github.bhack.mini-eq.yaml
137+
flatpak run --command=flatpak-builder org.flatpak.Builder \
138+
--force-clean \
139+
--install-deps-from=flathub \
140+
--repo=repo \
141+
build-dir io.github.bhack.mini-eq.yaml
142+
```
143+
107144
If a `repo/` is produced, run:
108145

109146
```bash

docs/release.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,39 @@ and attaches the built wheel and sdist. Keep `draft=true` for the first run,
4545
review the generated notes and assets on GitHub, then publish the draft
4646
manually.
4747

48+
For a production GitHub release plus PyPI publish, dispatch with:
49+
50+
```bash
51+
gh workflow run release.yml --repo bhack/mini-eq --ref main \
52+
-f dry_run=false \
53+
-f create_github_release=true \
54+
-f tag_name=vX.Y.Z \
55+
-f target=main \
56+
-f draft=true \
57+
-f prerelease=false \
58+
-f publish_testpypi=false \
59+
-f publish_pypi=true
60+
```
61+
62+
If the `pypi` environment requires approval, the publish job will stay in
63+
`waiting` until the deployment is approved in GitHub Actions. The same approval
64+
can be done with `gh` when the logged-in account is allowed to approve:
65+
66+
```bash
67+
run_id=<workflow run id>
68+
gh api "repos/bhack/mini-eq/actions/runs/${run_id}/pending_deployments"
69+
environment_id=1234567890
70+
gh api "repos/bhack/mini-eq/actions/runs/${run_id}/pending_deployments" \
71+
-X POST \
72+
-F environment_ids[]="$environment_id" \
73+
-f state=approved \
74+
-f comment='Publish vX.Y.Z to PyPI'
75+
```
76+
77+
Draft GitHub release assets use temporary `untagged-*` download URLs. Publish
78+
the draft before using release asset URLs in the Flathub manifest or other
79+
public metadata.
80+
4881
Set `publish_testpypi=true` only after the `testpypi` GitHub environment and
4982
TestPyPI trusted publisher are configured. The TestPyPI job uses
5083
`pypa/gh-action-pypi-publish` with OIDC and does not use API tokens. Keep PyPI
@@ -128,3 +161,14 @@ For production PyPI publishing, dispatch the workflow with `dry_run=false`,
128161
`create_github_release=true`, `tag_name=vX.Y.Z`, and `publish_pypi=true`.
129162
Use Trusted Publishing/OIDC and the separate `pypi` environment rather than
130163
long-lived API tokens.
164+
165+
After the workflow completes:
166+
167+
```bash
168+
gh release view vX.Y.Z --repo bhack/mini-eq --json tagName,isDraft,isPrerelease,assets,url
169+
curl -fsSL https://pypi.org/pypi/mini-eq/json | jq -r '.info.version'
170+
git ls-remote --tags origin vX.Y.Z
171+
```
172+
173+
Publish the draft GitHub release after reviewing its notes and assets. Then use
174+
the published release tarball and SHA-256 for the Flathub repository update.

0 commit comments

Comments
 (0)