Skip to content

Commit a6ea859

Browse files
chore: add CI
1 parent 8ad4311 commit a6ea859

File tree

5 files changed

+132
-1
lines changed

5 files changed

+132
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: npm publish / GitHub release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v1
15+
- name: Setup Node
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 16
19+
registry-url: https://registry.npmjs.org/
20+
- name: Install
21+
env:
22+
CI: true
23+
run: yarn install
24+
- name: Semantic Release
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
29+
run: yarn semantic-release

.releaserc.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
[
7+
"@semantic-release/changelog",
8+
{
9+
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines."
10+
}
11+
],
12+
[
13+
"@semantic-release/npm",
14+
{
15+
"tarballDir": "pack"
16+
}
17+
],
18+
[
19+
"@semantic-release/github",
20+
{
21+
"assets": "pack/*.tgz"
22+
}
23+
],
24+
[
25+
"@semantic-release/git",
26+
{
27+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
28+
}
29+
]
30+
]
31+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Karl Moeller
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.

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# ssh-code
2+
3+
A simple command for starting vscode in a remote ssh folder.
4+
5+
# Usage
6+
7+
You need to have node and vscode installed.
8+
9+
Install via npm:
10+
```
11+
npm i -g ssh-code
12+
```
13+
then run the `ssh-code` or `scode` command (both commands do the same `scode` is just an alias):
14+
```
15+
ssh-code user@host:/path
16+
```
17+
the user is optional so you can also just run:
18+
```
19+
scode host:/path
20+
```
21+
22+
alternativly you can also run directly via npx (note: only the `ssh-code` command will work):
23+
```
24+
npx ssh-code user@host:/path
25+
```
26+
27+
# How it works
28+
29+
All it does is parse the user, host and path from the arguments and run the vscode command:
30+
```
31+
code --folder-uri=vscode-remote://ssh-remote+<user>@<host>/<path>
32+
```
33+
34+
see the [related issue](https://github.com/microsoft/vscode-remote-release/issues/3324) for more info.
35+
36+
# License
37+
38+
MIT

package.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ssh-code",
3-
"version": "1.0.0",
3+
"version": "0.0.0-development",
44
"main": "index.mjs",
55
"bin": {
66
"ssh-code": "index.mjs",
@@ -9,5 +9,17 @@
99
"license": "MIT",
1010
"dependencies": {
1111
"commander": "^9.4.1"
12+
},
13+
"scripts": {
14+
"semantic-release": "semantic-release"
15+
},
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/FreshlyBrewedCode/ssh-code.git"
19+
},
20+
"devDependencies": {
21+
"@semantic-release/changelog": "^6.0.1",
22+
"@semantic-release/git": "^10.0.1",
23+
"semantic-release": "^19.0.5"
1224
}
1325
}

0 commit comments

Comments
 (0)