Skip to content

Commit 12c9336

Browse files
committed
ci: fix npm publish
1 parent 22a4e63 commit 12c9336

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@ jobs:
5252
- name: Setup Node
5353
uses: actions/setup-node@v2
5454
with:
55-
node-version: 12
55+
node-version: "16"
5656
registry-url: https://registry.npmjs.org/
5757

5858
- name: Publish to NPM
59-
run: npm publish --access public
6059
env:
61-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
60+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
61+
run: |
62+
npm install
63+
npm run test:binwrap
64+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
65+
npm publish --access public

bin/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const path = require('path')
66

77
const pkg = require(path.join(__dirname, '..', 'package.json'))
88
const binary = 'fing'
9-
const root = `https://github.com/fingcloud/cli/releases/download/${pkg.version}/${binary}-`
9+
const root = `https://github.com/fingcloud/cli/releases/download/v${pkg.version}/${binary}-`
1010

1111
module.exports = binwrap({
1212
dirname: __dirname,

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@fingcloud/cli",
3-
"version": "v0.2.11",
3+
"version": "0.2.11",
44
"description": "Develop and deploy code with zero configuration",
55
"main": "bin/index.js",
66
"author": "Fing",
@@ -21,8 +21,7 @@
2121
"install": "binwrap-install",
2222
"prepare": "binwrap-prepare",
2323
"test": "test:binwrap",
24-
"test:binwrap": "binwrap-test",
25-
"prepublishOnly": "npm run test:binwrap"
24+
"test:binwrap": "binwrap-test"
2625
},
2726
"dependencies": {
2827
"binwrap": "^0.2.3"

0 commit comments

Comments
 (0)