aboutsummaryrefslogtreecommitdiff
path: root/scripts/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/README.md')
-rw-r--r--scripts/README.md56
1 files changed, 56 insertions, 0 deletions
diff --git a/scripts/README.md b/scripts/README.md
new file mode 100644
index 0000000..65b69ee
--- /dev/null
+++ b/scripts/README.md
@@ -0,0 +1,56 @@
1# Build Scripts
2
3This directory contains scripts for building and releasing the oar-p2p binary.
4
5## Scripts
6
7### build-static.sh
8
9Builds statically linked binaries for Linux and macOS.
10
11```bash
12# Build for all platforms (macOS only)
13./scripts/build-static.sh all
14
15# Build for Linux only
16./scripts/build-static.sh linux
17
18# Build for macOS only (macOS only)
19./scripts/build-static.sh macos
20
21# Specify custom output directory
22./scripts/build-static.sh linux /path/to/output
23```
24
25**Note**: Cross-compilation is not supported. Linux binaries must be built on Linux, and macOS binaries must be built on macOS. The GitHub Actions workflow handles this by using different runners.
26
27### prepare-release.sh
28
29Prepares a release by building binaries, creating tarballs, and generating checksums.
30
31```bash
32# Prepare release for version v1.0.0
33./scripts/prepare-release.sh v1.0.0
34
35# Specify custom output directory
36./scripts/prepare-release.sh v1.0.0 /path/to/dist
37```
38
39The script will:
401. Build static binaries for the current platform
412. Create tarballs with the binary and README
423. Generate SHA256 and SHA512 checksums
434. Create a release notes template
44
45## GitHub Actions
46
47The `.github/workflows/release.yml` workflow automatically:
481. Triggers on version tags (e.g., `v1.0.0`)
492. Builds binaries on Linux and macOS runners
503. Creates a GitHub release with all artifacts
51
52To create a release:
53```bash
54git tag -a v1.0.0 -m "Release v1.0.0"
55git push origin v1.0.0
56``` \ No newline at end of file