git-aicommit 7.1.0 → 7.2.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.
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
name: Auto Release on Version Change
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout code
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 1
|
|
18
|
+
|
|
19
|
+
- name: Get Version from package.json
|
|
20
|
+
id: get_version
|
|
21
|
+
run: echo "version=$(jq -r '.version' package.json)" >> $GITHUB_OUTPUT
|
|
22
|
+
shell: bash
|
|
23
|
+
|
|
24
|
+
- name: Check if tag exists remotely
|
|
25
|
+
id: check_tag
|
|
26
|
+
run: |
|
|
27
|
+
PACKAGE_VERSION="${{ steps.get_version.outputs.version }}"
|
|
28
|
+
TAG_NAME="v${PACKAGE_VERSION}" # Standard v-prefix for tags
|
|
29
|
+
echo "Checking for remote tag: ${TAG_NAME}"
|
|
30
|
+
|
|
31
|
+
TAG_EXISTS_COUNT=$(git ls-remote --tags origin "refs/tags/${TAG_NAME}" | wc -l)
|
|
32
|
+
|
|
33
|
+
if [ "$TAG_EXISTS_COUNT" -ne 0 ]; then
|
|
34
|
+
echo "Tag ${TAG_NAME} already exists remotely."
|
|
35
|
+
echo "exists=true" >> $GITHUB_OUTPUT
|
|
36
|
+
else
|
|
37
|
+
echo "Tag ${TAG_NAME} does not exist remotely. Proceeding."
|
|
38
|
+
echo "exists=false" >> $GITHUB_OUTPUT
|
|
39
|
+
fi
|
|
40
|
+
shell: bash
|
|
41
|
+
|
|
42
|
+
- name: Fail workflow if tag already exists
|
|
43
|
+
if: steps.check_tag.outputs.exists == 'true'
|
|
44
|
+
run: |
|
|
45
|
+
PACKAGE_VERSION="${{ steps.get_version.outputs.version }}"
|
|
46
|
+
TAG_NAME="v${PACKAGE_VERSION}"
|
|
47
|
+
echo "::error title=Tag Exists::Tag ${TAG_NAME} already exists. Halting release process."
|
|
48
|
+
exit 1 # This will fail the job and stop further execution
|
|
49
|
+
shell: bash
|
|
50
|
+
|
|
51
|
+
- name: Create Release (and Git Tag)
|
|
52
|
+
uses: actions/create-release@v1
|
|
53
|
+
with:
|
|
54
|
+
tag_name: v${{ steps.get_version.outputs.version }}
|
|
55
|
+
release_name: Release v${{ steps.get_version.outputs.version }}
|
|
56
|
+
draft: false
|
|
57
|
+
prerelease: false
|
|
58
|
+
env:
|
|
59
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
60
|
+
|
|
61
|
+
- name: Setup Node.js
|
|
62
|
+
uses: actions/setup-node@v3 # Can update to v4 if available and desired
|
|
63
|
+
with:
|
|
64
|
+
node-version: 18
|
|
65
|
+
registry-url: https://registry.npmjs.org/
|
|
66
|
+
|
|
67
|
+
- name: Install dependencies
|
|
68
|
+
run: npm ci
|
|
69
|
+
|
|
70
|
+
- name: Publish to npm
|
|
71
|
+
run: npm publish
|
|
72
|
+
env:
|
|
73
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-aicommit",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Generates auto commit messages with OpenAI GPT3 model",
|
|
5
5
|
"main": "autocommit.js",
|
|
6
6
|
"repository": "https://github.com/shanginn/autocommit",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"openai": "^4.
|
|
11
|
+
"openai": "^4.100.0",
|
|
12
12
|
"rc": "^1.2.8",
|
|
13
|
-
"tiktoken": "^1.0.
|
|
13
|
+
"tiktoken": "^1.0.21"
|
|
14
14
|
},
|
|
15
15
|
"preferGlobal": true,
|
|
16
16
|
"bin": {
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
name: Node.js Package
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [created]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
publish-npm:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v3
|
|
12
|
-
- uses: actions/setup-node@v3
|
|
13
|
-
with:
|
|
14
|
-
node-version: 18
|
|
15
|
-
registry-url: https://registry.npmjs.org/
|
|
16
|
-
- run: npm ci
|
|
17
|
-
- run: npm publish
|
|
18
|
-
env:
|
|
19
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|