Skip to content

Commit e13e3ec

Browse files
committed
use js-dev tools publish instead
1 parent 883cf97 commit e13e3ec

2 files changed

Lines changed: 13 additions & 36 deletions

File tree

.github/workflows/publish.yml

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,19 @@
1-
name: Publish to npm and Create GitHub Release
1+
name: Publish to npm
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: main
76

87
jobs:
98
publish:
109
runs-on: ubuntu-latest
11-
1210
steps:
13-
- name: Checkout repository
14-
uses: actions/checkout@v2
15-
16-
- name: Setup Node.js
17-
uses: actions/setup-node@v2
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-node@v3
1813
with:
19-
node-version: '18'
20-
registry-url: 'https://registry.npmjs.org'
21-
22-
- name: Install dependencies
23-
run: npm ci
24-
25-
- name: Publish to npm
26-
run: npm publish --provenance --access public
27-
env:
28-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
29-
30-
- name: Get version from package.json
31-
id: get_version
32-
run: echo "::set-output name=VERSION::$(node -p -e "require('./package.json').version")"
33-
34-
- name: Create GitHub Release
35-
id: create_release
36-
uses: actions/create-release@v1
37-
env:
38-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
node-version: "18"
15+
- run: npm ci
16+
- run: npm test
17+
- uses: JS-DevTools/npm-publish@v3
3918
with:
40-
tag_name: v${{ steps.get_version.outputs.VERSION }}
41-
release_name: Release ${{ steps.get_version.outputs.VERSION }}
42-
body: |
43-
## Changes
44-
- Describe your changes here
45-
draft: false
46-
prerelease: false
19+
token: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
"description": "Command AI",
55
"main": "ai.js",
66
"type": "module",
7+
"repository": {
8+
"type": "git",
9+
"url": "https://github.com/CommandAI/ai-cli"
10+
},
711
"bin": {
812
"ai": "./ai.js",
913
"ai!": "./ai!.js",

0 commit comments

Comments
 (0)