@hurshb50/setup-ubuntu 0.0.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/README.md +59 -0
- package/package.json +53 -0
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# setup-ubuntu
|
|
2
|
+
|
|
3
|
+
## Publishing
|
|
4
|
+
|
|
5
|
+
The repo includes two GitHub Actions workflows.
|
|
6
|
+
|
|
7
|
+
- `publish.yaml` checks, tests, builds, bumps the version, tags it, and stages the package on npm.
|
|
8
|
+
- `release.yaml` publishes a GitHub release once the version is live.
|
|
9
|
+
|
|
10
|
+
CI uses npm's OIDC trusted publishing and staged publishing. No npm token. Nothing goes live until you approve it with 2FA.
|
|
11
|
+
|
|
12
|
+
## One-time setup
|
|
13
|
+
|
|
14
|
+
1. Push the repo to GitHub. Run `gh auth login` first if needed.
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
git init -b main
|
|
18
|
+
git add .
|
|
19
|
+
git commit -m "Initial commit"
|
|
20
|
+
gh repo create setup-ubuntu --public --source . --remote origin --push
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
2. Log in to npm.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
vp pm login
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
3. Publish the first version manually. npm cannot stage a new package.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
vp pm publish
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This publishes 0.0.0. Later releases go through CI.
|
|
36
|
+
|
|
37
|
+
4. Allow GitHub Actions to publish. In the package settings on npmjs.com, add a GitHub Actions trusted publisher.
|
|
38
|
+
|
|
39
|
+
- Organization or user: `hurshb50`
|
|
40
|
+
- Repository: `setup-ubuntu`
|
|
41
|
+
- Workflow filename: `publish.yaml`
|
|
42
|
+
- Allowed actions: staged publishing only
|
|
43
|
+
|
|
44
|
+
5. Optional: in package settings under Publishing access, set "Require two-factor authentication and disallow tokens". CI still works through OIDC.
|
|
45
|
+
|
|
46
|
+
## Releasing a version
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
gh workflow run publish.yaml -f bump=patch
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Use `minor` or `major` instead of `patch` when it fits. Then approve the staged package.
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
vp pm stage list
|
|
56
|
+
vp pm stage approve <stage-id>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
You can also approve on npmjs.com under Staged Packages. The Release workflow creates the GitHub release on its weekly run. Run `gh workflow run release.yaml` to do it now.
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hurshb50/setup-ubuntu",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"files": [
|
|
6
|
+
"distribution"
|
|
7
|
+
],
|
|
8
|
+
"bin": "./distribution/setup-ubuntu.js",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "vp pack",
|
|
11
|
+
"check": "vp check",
|
|
12
|
+
"check-fix": "vp check --fix",
|
|
13
|
+
"test": "vp test",
|
|
14
|
+
"test-watch": "vp test --watch"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@commander-js/extra-typings": "^15.0.0",
|
|
18
|
+
"@types/bun": "latest",
|
|
19
|
+
"bumpp": "^11.1.0",
|
|
20
|
+
"typescript": "^7.0.2",
|
|
21
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.1",
|
|
22
|
+
"vite-plus": "^0.2.4"
|
|
23
|
+
},
|
|
24
|
+
"overrides": {
|
|
25
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.3.1"
|
|
26
|
+
},
|
|
27
|
+
"devEngines": {
|
|
28
|
+
"runtime": {
|
|
29
|
+
"name": "node",
|
|
30
|
+
"version": "24.21.0",
|
|
31
|
+
"onFail": "download"
|
|
32
|
+
},
|
|
33
|
+
"packageManager": {
|
|
34
|
+
"name": "npm",
|
|
35
|
+
"version": "12.0.2",
|
|
36
|
+
"onFail": "download"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"description": "TODO",
|
|
40
|
+
"homepage": "https://github.com/hurshb50/setup-ubuntu#readme",
|
|
41
|
+
"bugs": {
|
|
42
|
+
"url": "https://github.com/hurshb50/setup-ubuntu/issues"
|
|
43
|
+
},
|
|
44
|
+
"license": "MIT",
|
|
45
|
+
"author": "Hursh Patel <hurshb50@gmail.com>",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/hurshb50/setup-ubuntu.git"
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
}
|
|
53
|
+
}
|