Skip to content

Commit 5333ab9

Browse files
committed
🐛 switch to github workflows
1 parent 2211a66 commit 5333ab9

File tree

7 files changed

+117
-62
lines changed

7 files changed

+117
-62
lines changed

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- master
7+
tags:
8+
- '!*' # Do not execute on tags
9+
env:
10+
NAME: ${{vars.NAME}}
11+
EMAIL: ${{vars.EMAIL}}
12+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
13+
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}
14+
FORCE_COLOR: 1
15+
16+
17+
jobs:
18+
test:
19+
strategy:
20+
matrix:
21+
platform: [ubuntu-latest, windows-latest, macOS-latest]
22+
node: [24.x]
23+
name: Test on ${{matrix.platform}}
24+
runs-on: ${{matrix.platform}}
25+
steps:
26+
- uses: actions/checkout@v6
27+
- uses: actions/setup-node@v6
28+
with:
29+
node-version: ${{matrix.node}}
30+
- run: npm ci
31+
- run: npm test
32+
33+
34+
publish:
35+
name: Publish package
36+
needs: [test]
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v6
40+
- uses: actions/setup-node@v6
41+
with:
42+
node-version: 24.x
43+
- uses: nodef/npm-config.action@v1.0.0
44+
with:
45+
credentials: auto
46+
entries: access=public
47+
env:
48+
GITHUB_TOKEN: ${{env.GITHUB_TOKEN}}
49+
NPM_TOKEN: ${{env.NPM_TOKEN}}
50+
- run: npm ci
51+
- run: node build.js
52+
- run: npm publish
53+
env:
54+
NODE_AUTH_TOKEN: ${{env.NPM_TOKEN}}

.github/workflows/pr.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: PR
2+
on: [pull_request]
3+
env:
4+
FORCE_COLOR: 1
5+
6+
7+
jobs:
8+
test:
9+
strategy:
10+
matrix:
11+
platform: [ubuntu-latest, windows-latest, macOS-latest]
12+
node: [24.x]
13+
name: Test on ${{ matrix.platform }}
14+
runs-on: ${{ matrix.platform }}
15+
steps:
16+
- uses: actions/checkout@v6
17+
- uses: actions/setup-node@v6
18+
with:
19+
node-version: ${{ matrix.node }}
20+
- run: npm ci
21+
- run: npm test

.npmignore

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,2 @@
1-
# Parts
2-
src/
3-
wiki/
4-
tests/
5-
.gitmodules
6-
71
# Build
8-
.build/
9-
.travis.yml
10-
.coveralls.yml
11-
tsconfig.json
12-
jestconfig.json
13-
rollup.config.js
142
build.js
15-
*.log
16-
17-
# Others
18-
unused/
19-
unused.*
20-
TODO

.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,71 @@
11
Common utility commands for [Git] repositories.<br>
2-
📦 [NPM](https://www.npmjs.com/package/extra-git),
32
🖥️ [Shell](https://www.npmjs.com/package/extra-git.sh),
4-
📜 [Files](https://unpkg.com/extra-git/),
5-
📘 [Wiki](https://github.com/nodef/extra-git/wiki/).
3+
📜 [Files](https://unpkg.com/extra-git.sh/),
4+
📘 [Wiki](https://github.com/nodef/extra-git.sh/wiki/).
65

76
This is an extension of ["git-extras"] and ["git-extra-commands"], including
8-
some additional commonly used git tools; [cpush], [apush], and [xclone].<br>
9-
You can install this with `npm install -g extra-git.sh`.
7+
some additional commonly used git tools; [cpush], [apush], and [xclone].
108

11-
> Stability: [Experimental](https://www.youtube.com/watch?v=L1j93RnIxEo).
9+
### Installation
10+
11+
```bash
12+
# Install extra-git as `extra-git`, `xgit`, or `egit`
13+
$ npm i -g extra-git.sh
14+
```
1215

1316
<br>
1417

18+
19+
## Examples
20+
1521
```bash
1622
# Commit current changes and push (inc. submodules)
17-
$ egit cpush "message"
23+
# $GIT_COMMIT_PREFIX: Commit message prefix (optional)
24+
$ xgit cpush "message"
1825

1926
# Amend current changes and push (inc. submodules)
20-
$ egit apush
27+
$ xgit apush
2128

2229
# Clone repository to local (inc. submodules)
23-
$ egit xclone openstack/openstack
24-
25-
26-
30+
$ xgit xclone openstack/openstack
31+
```
2732

33+
```bash
2834
# Do a hard reset and delete all untracked files
29-
$ egit clear
30-
35+
$ xgit clear
36+
```
3137

38+
```bash
3239
# List authors
33-
$ egit authors --list
34-
$ egit authors --list --no-email
40+
$ xgit authors --list
41+
$ xgit authors --list --no-email
3542

3643
# TJ Holowaychuk <tj@vision-media.ca>
3744
# hemanth.hm <hemanth.hm@gmail.com>
3845
# Jonhnny Weslley <jw@jonhnnyweslley.net>
3946
# nickl- <github@jigsoft.co.za>
4047
# Leila Muhtasib <muhtasib@gmail.com>
48+
```
4149

42-
50+
```bash
4351
# Merge commits from src-branch into the current branch as a single commit
44-
$ egit squash fixed-cursor-styling
45-
$ egit squash fixed-cursor-styling "Fixed cursor styling"
46-
$ egit squash 95b7c52
47-
$ egit squash HEAD~3
48-
$ egit squash HEAD~3 "Work on a feature"
49-
50-
51-
52+
$ xgit squash fixed-cursor-styling
53+
$ xgit squash fixed-cursor-styling "Fixed cursor styling"
54+
$ xgit squash 95b7c52
55+
$ xgit squash HEAD~3
56+
$ xgit squash HEAD~3 "Work on a feature"
57+
```
5258

59+
```bash
5360
# Current branch name in automation-friendly format
54-
$ egit branch-name
61+
$ xgit branch-name
5562
# main
5663

5764
# Delete all local branches that have been merged into HEAD
58-
$ egit delete-local-merged
65+
$ xgit delete-local-merged
5966

6067
# Show files being ignored by git in the repo
61-
$ egit ignored
68+
$ xgit ignored
6269
```
6370

6471
<br>
@@ -309,7 +316,7 @@ $ egit ignored
309316

310317

311318
[![](https://img.youtube.com/vi/Nzr4qG_yZHU/maxresdefault.jpg)](https://www.youtube.com/watch?v=Nzr4qG_yZHU)
312-
![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/extra-git)
319+
![](https://ga-beacon.deno.dev/G-RC63DPBH3P:SH3Eq-NoQ9mwgYeHWxu7cw/github.com/nodef/extra-git.SH)
313320

314321
[Git]: https://git-scm.com
315322
["git-extras"]: https://github.com/tj/git-extras

package-lock.json

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

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "extra-git.sh",
3-
"version": "2.0.2",
3+
"version": "2.2.0",
44
"description": "Common utility commands for Git repositories.",
55
"preferGlobal": true,
66
"main": "index.sh",
@@ -32,12 +32,12 @@
3232
"license": "MIT",
3333
"repository": {
3434
"type": "git",
35-
"url": "git+https://github.com/nodef/extra-git.git"
35+
"url": "git+https://github.com/nodef/extra-git.sh.git"
3636
},
3737
"bugs": {
38-
"url": "https://github.com/nodef/extra-git/issues"
38+
"url": "https://github.com/nodef/extra-git.sh/issues"
3939
},
40-
"homepage": "https://github.com/nodef/extra-git#readme",
40+
"homepage": "https://github.com/nodef/extra-git.sh#readme",
4141
"devDependencies": {
4242
"html-entities": "^2.6.0",
4343
"markdown-to-text": "^0.1.1"

0 commit comments

Comments
 (0)