@peterseibel/hug 0.1.7 → 0.1.9
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/.github/workflows/publish.yml +21 -0
- package/CLAUDE.md +1 -1
- package/DEVELOPMENT.md +15 -17
- package/README.md +1 -1
- package/bin/hug +2 -2
- package/package.json +6 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
id-token: write
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v5
|
|
16
|
+
- uses: actions/setup-node@v5
|
|
17
|
+
with:
|
|
18
|
+
node-version: 24
|
|
19
|
+
registry-url: https://registry.npmjs.org
|
|
20
|
+
- run: npm install -g npm@latest
|
|
21
|
+
- run: npm publish --provenance --access public
|
package/CLAUDE.md
CHANGED
|
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
`hug` is a
|
|
7
|
+
`hug` is a bash CLI that wraps [clasp](https://github.com/google/clasp) to provide opinionated project management for Google Apps Script projects. It handles project creation (from templates or by importing existing projects), forking projects for branch-based workflows, and a push→version→deploy workflow.
|
|
8
8
|
|
|
9
9
|
## Project structure
|
|
10
10
|
|
package/DEVELOPMENT.md
CHANGED
|
@@ -47,29 +47,27 @@ Scoped packages are private by default. To publish as public:
|
|
|
47
47
|
npm publish --access public
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
###
|
|
50
|
+
### Automated publishing via GitHub Actions
|
|
51
51
|
|
|
52
|
-
|
|
52
|
+
Pushing a version tag triggers a GitHub Actions workflow that publishes to npm
|
|
53
|
+
automatically using [Trusted Publishing](https://docs.npmjs.com/trusted-publishers/)
|
|
54
|
+
(OIDC — no npm token needed).
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
npm version patch # 0.1.0 -> 0.1.1
|
|
56
|
-
npm version minor # 0.1.1 -> 0.2.0
|
|
57
|
-
npm version major # 0.2.0 -> 1.0.0
|
|
58
|
-
```
|
|
56
|
+
**One-time setup:**
|
|
59
57
|
|
|
60
|
-
|
|
58
|
+
1. On npmjs.com, go to the package settings for `@peterseibel/hug`.
|
|
59
|
+
2. Add a trusted publisher: your GitHub user/repo and workflow filename
|
|
60
|
+
(`publish.yml`).
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
**To release:**
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
3. Push the version commit and tag:
|
|
64
|
+
```bash
|
|
65
|
+
npm version patch # or minor / major
|
|
66
|
+
git push --follow-tags
|
|
67
|
+
```
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
```
|
|
69
|
+
`npm version` bumps `package.json`, commits, and creates a `v*` tag. Pushing
|
|
70
|
+
the tag triggers the workflow in `.github/workflows/publish.yml`.
|
|
73
71
|
|
|
74
72
|
## Dependencies
|
|
75
73
|
|
package/README.md
CHANGED
package/bin/hug
CHANGED
|
@@ -11,11 +11,11 @@ done
|
|
|
11
11
|
HUG_ROOT="$(cd "$(dirname "$SOURCE")/.." && pwd)"
|
|
12
12
|
source "$HUG_ROOT/lib/common.sh"
|
|
13
13
|
|
|
14
|
-
VERSION
|
|
14
|
+
VERSION=$(grep '"version"' "$HUG_ROOT/package.json" | sed 's/.*"version"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')
|
|
15
15
|
|
|
16
16
|
usage() {
|
|
17
17
|
cat <<EOF
|
|
18
|
-
hug $VERSION — a
|
|
18
|
+
hug $VERSION — a wrapper around clasp
|
|
19
19
|
|
|
20
20
|
Usage: hug <command> [options]
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peterseibel/hug",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "A
|
|
3
|
+
"version": "0.1.9",
|
|
4
|
+
"description": "A wrapper around clasp for managing Google Apps Script projects",
|
|
5
5
|
"bin": {
|
|
6
6
|
"hug": "bin/hug"
|
|
7
7
|
},
|
|
@@ -9,6 +9,10 @@
|
|
|
9
9
|
"google-apps-script",
|
|
10
10
|
"clasp"
|
|
11
11
|
],
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/gigamonkey/hug"
|
|
15
|
+
},
|
|
12
16
|
"license": "ISC",
|
|
13
17
|
"dependencies": {
|
|
14
18
|
"@google/clasp": "^3.2.0"
|