berget 2.2.0 → 2.2.2
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 +20 -6
- package/dist/index.js +2 -2
- package/dist/package.json +1 -1
- package/dist/src/commands/code.js +33 -455
- package/index.ts +3 -3
- package/package.json +1 -1
- package/src/commands/code.ts +34 -546
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
name: Publish to NPM
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
bump:
|
|
7
|
+
description: 'Version bump type'
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
options:
|
|
11
|
+
- patch
|
|
12
|
+
- minor
|
|
13
|
+
- major
|
|
9
14
|
|
|
10
15
|
jobs:
|
|
11
16
|
test:
|
|
@@ -32,10 +37,12 @@ jobs:
|
|
|
32
37
|
publish:
|
|
33
38
|
needs: test
|
|
34
39
|
runs-on: ubuntu-latest
|
|
35
|
-
if: github.ref == 'refs/heads/main' || github.event_name == 'release'
|
|
36
40
|
steps:
|
|
37
41
|
- name: Checkout code
|
|
38
42
|
uses: actions/checkout@v4
|
|
43
|
+
with:
|
|
44
|
+
fetch-depth: 0
|
|
45
|
+
ref: main
|
|
39
46
|
|
|
40
47
|
- name: Setup Node.js
|
|
41
48
|
uses: actions/setup-node@v4
|
|
@@ -50,6 +57,13 @@ jobs:
|
|
|
50
57
|
- name: Build project
|
|
51
58
|
run: npm run build
|
|
52
59
|
|
|
60
|
+
- name: Bump version
|
|
61
|
+
run: |
|
|
62
|
+
git config user.name "github-actions[bot]"
|
|
63
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
64
|
+
npm version ${{ inputs.bump }} -m "release: %s"
|
|
65
|
+
git push --follow-tags
|
|
66
|
+
|
|
53
67
|
- name: Publish to NPM
|
|
54
68
|
run: npm publish
|
|
55
69
|
env:
|
package/dist/index.js
CHANGED
|
@@ -24,8 +24,8 @@ commander_1.program
|
|
|
24
24
|
|___/ AI on European terms
|
|
25
25
|
Version: ${package_json_1.version}`)
|
|
26
26
|
.version(package_json_1.version, '-v, --version')
|
|
27
|
-
.
|
|
28
|
-
.
|
|
27
|
+
.addOption(new commander_1.Option('--local').default(false).hideHelp())
|
|
28
|
+
.addOption(new commander_1.Option('--stage').default(false).hideHelp())
|
|
29
29
|
.option('--debug', 'Enable debug output', false);
|
|
30
30
|
// Register all commands
|
|
31
31
|
(0, commands_1.registerCommands)(commander_1.program);
|