prepare v0.1.0 release
test / test (ubuntu-latest) (push) Successful in 10m46s
test / test (macos-latest) (push) Canceled after 0s

This commit is contained in:
Meghdad committed 2026-10-01 21:32:01 +03:30
1 parent cf6ae40663
commit f822fc6b14
24 files changed
+483 -127

No files matched your search

+100 -82
View File
@@ -1,98 +1,116 @@
# Publishing Ask53
# Releasing Ask53
This checkout is prepared for a public source repository. It does not contain a
remote URL, GitHub repository, published release, or registry credentials.
The public source repository is
[MeghdadFadaee/ask-53](https://github.com/MeghdadFadaee/ask-53). The first planned
release is **v0.1.0**. Preparing files or running a local build does not publish it.
## Publish the source repository
## Prepare a release commit
1. Review the source and [MIT license](LICENSE). Actual credentials and private
client networks must stay in ignored local files or outside this checkout.
2. Create an empty public repository on your preferred host. On GitHub, avoid
precreating a README/license because this checkout already provides them.
3. If this checkout has no commits yet, create the initial commit first:
1. Update `CHANGELOG.md` and create `docs/releases/VERSION.md`, including
installation instructions, changes, and known limitations. v0.1.0 is prepared
in [its release notes](docs/releases/v0.1.0.md). Keep an `Unreleased` section for
subsequent work. This project follows 0.x versioning; interfaces may change.
2. Use a supported Go 1.26+ patch release and run:
```sh
git diff --cached --check
git commit -m 'Initial public-ready Ask53 implementation'
go mod verify
make check
make test
make release VERSION=v0.1.0
make verify-release VERSION=v0.1.0
bash scripts/test-release.sh v0.1.0
```
If your Git configuration requires a signature, make the configured signing
key available locally before committing. The preparation process does not
disable signing or handle private-key passphrases.
Output is `dist/v0.1.0/`: four Linux/macOS amd64/arm64 `.tar.gz` archives and
`SHA256SUMS`. Verification checks all hashes, exact package contents, and the
native binary's version/configuration. Output directories cannot be overwritten;
use `ASK53_RELEASE_DIR=/absolute/new/path` for a fresh candidate build. Generated
files stay ignored and must not be committed.
3. Review and commit the release preparation, preserving configured commit
signing. Push the commit to `main` through the normal review process and wait
for both Linux and macOS test checks to pass. Tag the exact reviewed commit.
Add the repository's actual URL and push the initial branch:
Optional: run the **release** workflow manually on that commit's branch/ref with
`version=v0.1.0`. It runs the same checks and uploads archives as a workflow
artifact, without creating a GitHub release. Release notes must exist for that
version. Inspect/download the artifact from the Actions run.
```sh
git remote add origin YOUR_REPOSITORY_URL
git push -u origin main
```
## Create the draft from a tag
4. On GitHub, wait for both Linux and macOS test jobs to pass. Protect `main`,
require review and the test checks, enable private vulnerability reporting,
and enable secret scanning/push protection where available. The configuration
files here cannot enable host-side settings before a remote exists.
5. Add a repository description, for example: “Ask concise AI questions through
DNS TXT records, with bounded spending, caching, and TCP safeguards.” Suggested
topics: `dns`, `go`, `ai`, `txt-records`, `openai-compatible`.
The current Go module is intentionally `ask53`, with only internal packages and
commands. Users can clone and build it using `make build`. If you want remote
`go install` support, first choose the final host/owner/repository URL, change
`module ask53` and the internal import prefixes to that canonical path, and
rerun the tests. Do not advertise an unconfigured install URL.
## Prepare a binary release
Use a supported Go patch release. Choose the release version, review the
changelog, and run:
After the preparation commit is on `main` and CI is green:
```sh
make check
make test
make release VERSION=v0.1.0
```
The output directory is `dist/v0.1.0/`, containing four `.tar.gz` archives and
`SHA256SUMS`. Each archive contains `ask53`, the MIT license, dependency notices,
README, and example configurations/deployment files. Archives contain no API
keys, runtime budgets, IDE files, or private configuration. The local mock
provider remains a source-checkout development tool, not a release daemon.
Extract and verify the binary appropriate for your current OS/architecture:
```sh
cd dist/v0.1.0
# Linux:
sha256sum -c SHA256SUMS
# macOS alternative:
# shasum -a 256 -c SHA256SUMS
tar -xzf ask53-v0.1.0-linux-amd64.tar.gz
./ask53-v0.1.0-linux-amd64/ask53 -version
```
Select the `darwin` archive when testing on macOS. Retain checksum and license
files when redistributing. Do not package your working-directory secrets into a
handmade archive of the entire checkout.
The **build release archives** GitHub Actions workflow can be started manually
with a version string. It uploads a downloadable workflow artifact under
read-only repository permissions; it does not create tags, GitHub releases, or
container registry pushes. The regular test workflow also checks packaging on
Linux with an unpublished CI version.
Once the exact release commit's CI is green and its archives are verified:
```sh
git tag -a v0.1.0 -m 'Ask53 v0.1.0'
git switch main
git pull --ff-only
git tag -s v0.1.0 -m 'Ask53 v0.1.0'
git push origin v0.1.0
```
Create a release on the repository host from that tag and attach only the four
archives and `SHA256SUMS`. Use the build artifacts from that same commit and
version, not an older local build. Publish the tested limitations from
[TESTING.md](TESTING.md); do not claim an untested live provider or deployment.
Use your configured signing key; do not disable signing to get around a locked
key. Check the target commit before tagging. If you cannot sign tags, follow your
repository's maintainer policy rather than silently publishing an unsigned tag.
Before an actual production release, run the systemd/container installation on
a target Linux host, verify both TCP and UDP port 53 with the intended firewall
and allowlist, and exercise the selected real provider with a deliberately small
budget. Keep existing quota state through upgrades.
Pushing a `v*` tag starts the **release** workflow. It validates the version/notes,
reuses the full Linux/macOS test workflow at the tagged commit, builds and verifies
all four archives, and uploads a workflow artifact. Only then does a separate job
with `contents: write` create a **draft** GitHub release containing the four
archives and `SHA256SUMS`. Build/test jobs retain read-only repository access.
Prerelease versions such as `v0.2.0-rc.1` are marked as prereleases.
The CLI uses [`--draft` and `--verify-tag`](https://cli.github.com/manual/gh_release_create)
to keep publication manual and require an existing remote tag. No API keys or
repository secrets are required beyond the workflow's scoped `GITHUB_TOKEN`.
Tag creation should use your normal Git credentials; tags pushed by another
workflow using its `GITHUB_TOKEN` generally do not trigger this workflow.
If checks fail, no draft is created. Fix the problem and use a new version if the
tag was already distributed. Re-run failed jobs for transient errors. If draft
creation partially succeeds, inspect its assets before repairing it; the workflow
intentionally does not overwrite an existing release or replace published assets.
## Review and publish
1. Open the draft in GitHub Releases. Confirm its tag/commit, notes, four archives,
and checksum manifest. Download and extract the archive for your machine:
```sh
# If all four archives were downloaded:
shasum -a 256 -c SHA256SUMS
# If only one archive was downloaded:
# shasum -a 256 --ignore-missing -c SHA256SUMS
tar -xzf ask53-v0.1.0-darwin-arm64.tar.gz
./ask53-v0.1.0-darwin-arm64/ask53 -version
```
On Linux use `sha256sum` and the matching `linux` archive. Missing files are
deliberately ignored only in the single-archive example; verify the selected
archive actually reports `OK`. Checksums detect corruption, not independent
publisher authenticity.
2. Review [TESTING.md](TESTING.md). Linux/macOS automated CI is required. A real
provider, container runtime, and systemd installation still need validation on
the intended deployment before calling that deployment production-tested.
Verify TCP/UDP port 53, firewall/allowlist, and a small provider budget there.
3. Click **Publish release** after this review. Keep existing budget state during
upgrades; release archives must never contain credentials or quota state.
For manual recovery, download the verified artifact from the tagged run, then:
```sh
gh release create v0.1.0 --draft --verify-tag --title 'Ask53 v0.1.0' \
--notes-file docs/releases/v0.1.0.md \
dist/v0.1.0/*.tar.gz dist/v0.1.0/SHA256SUMS
```
Only use files produced at that exact tag/version.
## Repository settings
Maintainers should protect `main`, require review and Linux/macOS checks, restrict
release-tag creation, and enable private vulnerability reporting and secret
scanning/push protection where available. See [SECURITY.md](SECURITY.md). These
host-side settings are managed separately from the source checkout.
The Go module is `github.com/MeghdadFadaee/ask-53`; packages are internal and only
commands are distributed. Prefer release binaries or `make build VERSION=v0.1.0`
from the tagged source to obtain an embedded release version. Plain `go install`
uses the development version unless linker flags are supplied.