Skip to content

Commit

Permalink
Add release-npm.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Sep 1, 2023
1 parent c1e17a9 commit 4cd7898
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release-npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
push:
tags:
- 'feishu-docx/v*'
branches:
- release-npm
permissions:
contents: read
pages: write
id-token: write
jobs:
release:
name: Release NPM (feishu-docx)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install dependencies & Build
run: |
cd feishu-docx
yarn
yarn build
- name: Publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd feishu-docx
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npm publish --access public
6 changes: 4 additions & 2 deletions feishu-docx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feishu-docx",
"version": "0.1.2",
"version": "0.1.3",
"description": "Convert Feishu Docx into other format (Markdown, HTML ...)",
"module": "src/index.ts",
"main": "dist/index.js",
Expand All @@ -15,11 +15,13 @@
},
"scripts": {
"build": "tsc -d",
"release": "yarn build && npm publish",
"test": "jest"
},
"dependencies": {
"@types/node": "^20.5.7",
"dotenv": "^16.3.1",
"feishu-docx": "^0.1.3",
"jsdom": "^22.1.0",
"typescript": "^5.2.2"
},
Expand All @@ -30,4 +32,4 @@
"ts-jest": "^29.1.1"
},
"license": "MIT"
}
}
4 changes: 2 additions & 2 deletions feishu-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
"@types/node": "^20.5.7",
"axios": "^1.5.0",
"dotenv": "^16.3.1",
"feishu-docx": "^0.1",
"feishu-docx": "^0.1.2",
"typescript": "^5.2.2"
},
"devDependencies": {
"@jest/globals": "^29.6.4",
"jest": "^29.6.4",
"ts-jest": "^29.1.1"
}
}
}

0 comments on commit 4cd7898

Please sign in to comment.