https://github.com/jakexchan/electron-publisher-cos
Electron builder publish plugin for Tencent Cloud COS (腾讯云 COS electron-builder 发布插件)
https://github.com/jakexchan/electron-publisher-cos
electron-builder tencent-cos
Last synced: 6 months ago
JSON representation
Electron builder publish plugin for Tencent Cloud COS (腾讯云 COS electron-builder 发布插件)
- Host: GitHub
- URL: https://github.com/jakexchan/electron-publisher-cos
- Owner: jakexchan
- Created: 2024-08-30T09:03:47.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-20T06:55:26.000Z (8 months ago)
- Last Synced: 2024-11-06T08:45:54.373Z (7 months ago)
- Topics: electron-builder, tencent-cos
- Language: TypeScript
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# electron-publisher-cos
Electron builder publish plugin for Tencent Cloud COS
腾讯云 COS `electron-builder` 发布插件
# Install
```bash
npm install --save-dev electron-publisher-cos
```or
```bash
yarn add electron-publisher-cos -D
```# Usage
1. Update the `electron-builder` configuration options for the `publish` provider.
```js
// electron-builder.config.js
{
"publish": [
{
"provider": "generic",
"publishAutoUpdate": true,
// or your cdn url
"url": "https:///${name}/${os}/${arch}/"
},
{
"provider": "custom",
"providerName": "cos",
"publishAutoUpdate": true,
"bucket": "your-cos-bucket",
"region": "your-cos-region",
"path": "your-cos-path",/**
* If you are using the environment variables COS_SECRET_ID and COS_SECRET_KEY, you can omit the settings here.
*/
"secretId": process.env.secretId,
"secretKey": process.env.secretKey,
}
]
}
```2. Add `electron-publisher-custom.js` on `build` folder.
```js
// build/electron-publisher-custom.js
const COSPublisher = require('electron-publisher-cos');
module.exports = COSPublisher;
```