@d-dev/bin-upload-win-arm64 0.2.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Derek Worthen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,125 @@
1
+ # Bin Upload
2
+
3
+ > Easily distribute binaries via npm, pypi, and GitHub releases.
4
+
5
+ `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:
6
+
7
+ - **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).
8
+ - **PyPI** — Builds wheel (`.whl`) packages for each platform-specific tag.
9
+ - **GitHub Releases** — Creates releases and uploads archive assets (`.tar.gz` or `.zip`).
10
+
11
+ [Full documentation](https://dworthen.github.io/bin-upload/).
12
+
13
+ ## Installation
14
+
15
+ <!-- tabs:start -->
16
+
17
+ ### **NPM**
18
+
19
+ ```sh
20
+ # Globally
21
+ npm install -g @d-dev/bin-upload
22
+ # or as a package dep
23
+ npm install -D @d-dev/bin-upload
24
+ # or run with npx
25
+ npx @d-dev/bin-upload <command>
26
+ ```
27
+
28
+ ### **Python**
29
+
30
+ ```sh
31
+ pip install bin-upload
32
+ # or with UV
33
+ uv tool install bin-upload
34
+ # or run with uvx
35
+ uvx bin-upload <command>
36
+ ```
37
+
38
+ ### **GitHub Releases**
39
+
40
+ Download the appropriate binary for your platform from the [releases page](https://github.com/dworthen/bin-upload/releases).
41
+
42
+ <!-- tabs:end -->
43
+
44
+ ## Requirements
45
+
46
+ The following must be installed and available on your path.
47
+
48
+ - [npm](https://www.npmjs.com/): if publishing to npm
49
+ - [uv](https://docs.astral.sh/uv/): if publishing to pypi
50
+
51
+ ## 1. Init
52
+
53
+ ```sh
54
+ bin-upload init
55
+ ```
56
+
57
+ This will walk you through an interactive prompt and generate a `bin-upload.config.yaml` file.
58
+
59
+ More on configuration [here](/configuration).
60
+
61
+ ## 2. Pack
62
+
63
+ ### Git flow
64
+
65
+ ```
66
+ git add .
67
+ git commit -m "..."
68
+ git tag -a v1.0.0 -m "Release v1.0.0"
69
+ bin-upload pack
70
+ ```
71
+
72
+ ### Non-git flow
73
+
74
+ ```sh
75
+ bin-upload pack -s npm.packageJson.version=1.0.0 -s pypi.metadata.Version=1.0.0
76
+ ```
77
+
78
+ This will generate artifacts in `.bin-upload` that can be published to npm (tarballs), pypi (wheel), and GitHub (tarballs and zips).
79
+
80
+ More on the pack command, including how to test artifacts prior to publishing, can be viewed [here](/pack).
81
+
82
+ ## 3. Publish
83
+
84
+ Create a `.env` file with the following tokens.
85
+
86
+ ```
87
+ # NPM granular access token that bypasses 2FA
88
+ # https://docs.npmjs.com/about-access-tokens
89
+ NPM_TOKEN="YOUR NPM TOKEN"
90
+ # GitHub token with repository metadata read and
91
+ # contents write permissions
92
+ GITHUB_TOKEN="YOUR GITHUB TOKEN"
93
+ PYPI_TOKEN="YOUR PYPI TOKEN"
94
+ ```
95
+
96
+ ### Git flow
97
+
98
+ ```
99
+ git push origin main --follow-tags
100
+ bin-upload publish
101
+ ```
102
+
103
+ ### Non-git flow
104
+
105
+ ```sh
106
+ bin-upload publish
107
+ ```
108
+
109
+ This publishes the artifacts generated by the `pack` command.
110
+
111
+ More on the publish command, including how to publish with GitHub actions, can be viewed [here](/publish).
112
+
113
+ ## Verify
114
+
115
+ Once published, install from npm or PyPI and confirm:
116
+
117
+ ```sh
118
+ # npm
119
+ npx YOUR_PACKAGE ...
120
+
121
+ # PyPI
122
+ uvx YOUR_PACKAE ...
123
+ ```
124
+
125
+ [Full documentation](https://dworthen.github.io/bin-upload/).
Binary file
package/index.js ADDED
@@ -0,0 +1,11 @@
1
+
2
+ import { join } from "node:path";
3
+ import { existsSync } from "node:fs";
4
+
5
+ export function getBinPath() {
6
+ const binPath = join(import.meta.dirname, "bin", "bin-upload.exe");
7
+ if (!existsSync(binPath)) {
8
+ throw new Error(`Binary not found at expected path: ${binPath}`);
9
+ }
10
+ return binPath;
11
+ }
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@d-dev/bin-upload-win-arm64",
3
+ "version": "0.2.0",
4
+ "description": "Publish binaries to npm, pypi, and github releases.",
5
+ "author": "Derek Worthen <worthend.derek@gmail.com>",
6
+ "license": "MIT",
7
+ "repository": "github:dworthen/bin-upload",
8
+ "homepage": "https://dworthen.github.io/bin-upload",
9
+ "keywords": [
10
+ "bin-upload",
11
+ "binary",
12
+ "npm",
13
+ "pypi",
14
+ "github",
15
+ "publish"
16
+ ],
17
+ "type": "module",
18
+ "exports": {
19
+ ".": {
20
+ "import": "./index.js"
21
+ },
22
+ "./package.json": "./package.json"
23
+ },
24
+ "files": [
25
+ "package.json",
26
+ "index.js",
27
+ "README.md",
28
+ "LICENSE",
29
+ "bin"
30
+ ],
31
+ "os": [
32
+ "win32"
33
+ ],
34
+ "cpu": [
35
+ "arm64"
36
+ ]
37
+ }