bin-upload 0.2.0__py3-none-win_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
bin_upload/__init__.py ADDED
@@ -0,0 +1,16 @@
1
+ from pathlib import Path
2
+ import os
3
+ import sys
4
+ import subprocess
5
+
6
+ def get_path() -> Path:
7
+ parent = Path(__file__).parent
8
+ return (parent / "bin" / "bin-upload.exe").resolve()
9
+
10
+ def run() -> None:
11
+ path = get_path()
12
+ path.chmod(0o774)
13
+ if sys.platform == "win32":
14
+ sys.exit(subprocess.run([path, *sys.argv[1:]]).returncode)
15
+ else:
16
+ os.execv(path, [str(path), *sys.argv[1:]])
Binary file
@@ -0,0 +1,137 @@
1
+ Metadata-Version: 2.5
2
+ Name: bin-upload
3
+ Version: 0.2.0
4
+ Summary: Publish binaries to npm, pypi, and github releases.
5
+ Author: Derek Worthen
6
+ Author-Email: worthend.derek@gmail.com
7
+ License-Expression: MIT
8
+ Requires-Python: >=3.11
9
+ Project-URL: homepage, https://dworthen.github.io/bin-upload
10
+ keywords: bin-upload,binary,pypi,npm,github,publish
11
+ Description-Content-Type: text/markdown
12
+
13
+ # Bin Upload
14
+
15
+ > Easily distribute binaries via npm, pypi, and GitHub releases.
16
+
17
+ `bin-upload` is a CLI tool built with [Bun](https://bun.sh) that packages and publishes pre-built binaries to multiple registries and platforms. It supports:
18
+
19
+ - **npm** — Publishes a main package that depends on platform-specific binary packages using [optionalDependencies](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#optionaldependencies).
20
+ - **PyPI** — Builds wheel (`.whl`) packages for each platform-specific tag.
21
+ - **GitHub Releases** — Creates releases and uploads archive assets (`.tar.gz` or `.zip`).
22
+
23
+ [Full documentation](https://dworthen.github.io/bin-upload/).
24
+
25
+ ## Installation
26
+
27
+ <!-- tabs:start -->
28
+
29
+ ### **NPM**
30
+
31
+ ```sh
32
+ # Globally
33
+ npm install -g @d-dev/bin-upload
34
+ # or as a package dep
35
+ npm install -D @d-dev/bin-upload
36
+ # or run with npx
37
+ npx @d-dev/bin-upload <command>
38
+ ```
39
+
40
+ ### **Python**
41
+
42
+ ```sh
43
+ pip install bin-upload
44
+ # or with UV
45
+ uv tool install bin-upload
46
+ # or run with uvx
47
+ uvx bin-upload <command>
48
+ ```
49
+
50
+ ### **GitHub Releases**
51
+
52
+ Download the appropriate binary for your platform from the [releases page](https://github.com/dworthen/bin-upload/releases).
53
+
54
+ <!-- tabs:end -->
55
+
56
+ ## Requirements
57
+
58
+ The following must be installed and available on your path.
59
+
60
+ - [npm](https://www.npmjs.com/): if publishing to npm
61
+ - [uv](https://docs.astral.sh/uv/): if publishing to pypi
62
+
63
+ ## 1. Init
64
+
65
+ ```sh
66
+ bin-upload init
67
+ ```
68
+
69
+ This will walk you through an interactive prompt and generate a `bin-upload.config.yaml` file.
70
+
71
+ More on configuration [here](/configuration).
72
+
73
+ ## 2. Pack
74
+
75
+ ### Git flow
76
+
77
+ ```
78
+ git add .
79
+ git commit -m "..."
80
+ git tag -a v1.0.0 -m "Release v1.0.0"
81
+ bin-upload pack
82
+ ```
83
+
84
+ ### Non-git flow
85
+
86
+ ```sh
87
+ bin-upload pack -s npm.packageJson.version=1.0.0 -s pypi.metadata.Version=1.0.0
88
+ ```
89
+
90
+ This will generate artifacts in `.bin-upload` that can be published to npm (tarballs), pypi (wheel), and GitHub (tarballs and zips).
91
+
92
+ More on the pack command, including how to test artifacts prior to publishing, can be viewed [here](/pack).
93
+
94
+ ## 3. Publish
95
+
96
+ Create a `.env` file with the following tokens.
97
+
98
+ ```
99
+ # NPM granular access token that bypasses 2FA
100
+ # https://docs.npmjs.com/about-access-tokens
101
+ NPM_TOKEN="YOUR NPM TOKEN"
102
+ # GitHub token with repository metadata read and
103
+ # contents write permissions
104
+ GITHUB_TOKEN="YOUR GITHUB TOKEN"
105
+ PYPI_TOKEN="YOUR PYPI TOKEN"
106
+ ```
107
+
108
+ ### Git flow
109
+
110
+ ```
111
+ git push origin main --follow-tags
112
+ bin-upload publish
113
+ ```
114
+
115
+ ### Non-git flow
116
+
117
+ ```sh
118
+ bin-upload publish
119
+ ```
120
+
121
+ This publishes the artifacts generated by the `pack` command.
122
+
123
+ More on the publish command, including how to publish with GitHub actions, can be viewed [here](/publish).
124
+
125
+ ## Verify
126
+
127
+ Once published, install from npm or PyPI and confirm:
128
+
129
+ ```sh
130
+ # npm
131
+ npx YOUR_PACKAGE ...
132
+
133
+ # PyPI
134
+ uvx YOUR_PACKAE ...
135
+ ```
136
+
137
+ [Full documentation](https://dworthen.github.io/bin-upload/).
@@ -0,0 +1,6 @@
1
+ bin_upload/__init__.py,sha256=HB9NrqTNJSE1ZZCcb7LEpKV_q3YW1MT1O2t0Ox9rYWs,405
2
+ bin_upload/bin/bin-upload.exe,sha256=csyNj-77hBXhOl-ZL0DD6ep7cWf3V7E7-kBqOJ6CpsA,112116736
3
+ bin_upload-0.2.0.dist-info/entry_points.txt,sha256=ulKY9tf-DDzHc4Dx21FJuMnre2DCcUIm8a5-iuxRjpU,54
4
+ bin_upload-0.2.0.dist-info/METADATA,sha256=dvTvthCYk7AFoWwyoKuq3uWVLvXYFaWsAXHZTyyjfqw,3232
5
+ bin_upload-0.2.0.dist-info/WHEEL,sha256=1RYqSOeKxOEeQvT-bKrEgyKsRFm7d2cFHsJx2_A74A0,89
6
+ bin_upload-0.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: manual 0.0.0
3
+ Root-Is-Purelib: false
4
+ Tag: py3-none-win_arm64
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ bin-upload = bin_upload.__init__:run