Skip to content

Commit 6b4a6db

Browse files
committed
Merge branch 'development'
2 parents 20c0d02 + cb84d10 commit 6b4a6db

17 files changed

Lines changed: 215 additions & 130 deletions

File tree

.agents/skills/ci-cd/SKILL.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,9 @@ When the main `README.MD` changes its tagline, logo URL, quick start commands, o
622622
**Platform support table missing new targets**
623623
When a new platform is added to any release matrix (e.g. `linux-arm64`), update the platform support table in `npm/smbcloud-cli/README.md` and `pypi/README.md` in the same PR.
624624

625+
**PyPI blocks short and protocol-reserved package names**
626+
PyPI maintains a blocklist of names that are too generic or conflict with well-known protocols and tools. `smb` is blocked because it is the name of the Windows SMB/CIFS file sharing protocol. Attempting to publish a package named `smb` returns `400 The name 'smb' isn't allowed`. There is no workaround — the name cannot be registered regardless of who owns it. If you need `uvx <name>` to work without `--from`, the package name and binary name must match AND the package name must not be on the blocklist. For this repo, `uvx --from smbcloud-cli smb` is the correct form.
627+
625628
**`on: release: types: [published]` does not fire when the release is created by automation**
626629
When `softprops/action-gh-release` (or any action) creates a GitHub Release using the implicit `GITHUB_TOKEN`, GitHub does not dispatch the `release` event to other workflows. The downstream workflow simply never runs — no error, no log entry. Use `workflow_dispatch` via `actions/github-script@v7` to chain workflows explicitly, and add `actions: write` to the upstream workflow's `permissions`.
627630

.agents/skills/smbcloud-cli-release/SKILL.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,29 @@ Or publish in one step:
132132

133133
For local uploads, export `MATURIN_PYPI_TOKEN` before running `maturin upload` or `maturin publish`.
134134

135+
### Publishing the smb stub (one-time)
136+
137+
The stub lives in `pypi/smb-stub/` and is built with `hatchling`, not `maturin`. It only needs to be published once — it never changes.
138+
139+
```sh
140+
cd pypi/smb-stub
141+
pip install hatchling build twine
142+
python -m build
143+
twine upload dist/*
144+
```
145+
146+
Or with uv:
147+
148+
```sh
149+
cd pypi/smb-stub
150+
uv run --with build python -m build
151+
uv run --with twine twine upload dist/*
152+
```
153+
154+
Use a PyPI API token with upload scope for `smb`. Trusted publishing is not required for a static stub.
155+
156+
Do not republish the stub on every CLI release. It permanently depends on the unpinned `smbcloud-cli`, so uv always resolves the latest version when the tool environment is created or upgraded.
157+
135158
### Local publishing constraint
136159

137160
A local publish normally builds only for the current platform.

.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ jobs:
2121
- uses: actions/checkout@v6
2222
- uses: dtolnay/rust-toolchain@stable
2323

24-
- name: Create .env file
25-
run: |
26-
touch .env
27-
echo CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }} >> .env
28-
cat .env
24+
- name: Export build secret
25+
run: echo "CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }}" >> "$GITHUB_ENV"
2926

3027
- run: cargo test --all-features

.github/workflows/release-crate.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,8 @@ jobs:
6868
with:
6969
key: publish
7070

71-
- name: Create .env file
72-
run: |
73-
touch .env
74-
echo CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }} >> .env
75-
cat .env
71+
- name: Export build secret
72+
run: echo "CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }}" >> "$GITHUB_ENV"
7673

7774
- name: Verify Cargo.toml version matches tag
7875
shell: bash

.github/workflows/release-github.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,8 @@ jobs:
8686
with:
8787
key: github-${{ matrix.target }}
8888

89-
- name: Create .env file
90-
run: |
91-
touch .env
92-
echo CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }} >> .env
93-
cat .env
89+
- name: Export build secrets
90+
run: echo "CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }}" >> "$GITHUB_ENV"
9491

9592
- name: Build binary
9693
shell: bash

.github/workflows/release-homebrew.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
echo "AMD64 SHA256: ${AMD64_SHA}"
5353
5454
- name: Checkout Homebrew tap
55-
uses: actions/checkout@v4
55+
uses: actions/checkout@v6
5656
with:
5757
repository: smbcloudXYZ/homebrew-tap
5858
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}

.github/workflows/release-npm.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,8 @@ jobs:
102102
rustup target add ${{ matrix.build.TARGET }} --toolchain ${{ env.RUST_TOOLCHAIN }}
103103
rustup target list --installed
104104
105-
- name: Create .env file
106-
run: |
107-
touch .env
108-
echo CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }} >> .env
109-
cat .env
105+
- name: Export build secret
106+
run: echo "CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }}" >> "$GITHUB_ENV"
110107

111108
- name: Build
112109
env:

.github/workflows/release-pypi.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,8 @@ jobs:
9797
rustup target add ${{ matrix.build.TARGET }} --toolchain ${{ env.RUST_TOOLCHAIN }}
9898
rustup target list --installed
9999
100-
- name: Create .env file
101-
run: |
102-
touch .env
103-
echo CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }} >> .env
104-
cat .env
100+
- name: Export build secret
101+
run: echo "CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }}" >> "$GITHUB_ENV"
105102

106103
- name: Build wheel
107104
uses: PyO3/maturin-action@v1
@@ -155,11 +152,8 @@ jobs:
155152
with:
156153
toolchain: ${{ env.RUST_TOOLCHAIN }}
157154

158-
- name: Create .env file
159-
run: |
160-
touch .env
161-
echo CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }} >> .env
162-
cat .env
155+
- name: Export build secret
156+
run: echo "CLI_CLIENT_SECRET=${{ secrets.CLI_CLIENT_SECRET }}" >> "$GITHUB_ENV"
163157

164158
- name: Build sdist
165159
uses: PyO3/maturin-action@v1

Cargo.lock

Lines changed: 0 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ console = "0.16"
1212
dialoguer = "0.11.0"
1313
dirs = "6.0"
1414

15-
dotenv_codegen = "0.15"
15+
1616
git2 = "0.20.1"
1717
home = "0.5.4"
1818
indicatif = "0.17.11"

0 commit comments

Comments
 (0)