-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.config.js
48 lines (44 loc) · 1.3 KB
/
release.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/** @format */
const _ = require("lodash");
const path = require("path");
const { name } = require("./package.json");
const distributions = {
"Browser - Single File": "./dist/browser.index.js.xz",
"Browser - with Source Maps": "./dist/browser.tar.xz",
"ES6 AMD - Single File": "./dist/amd.index.js.xz",
"ES6 AMD - with Source Maps": "./dist/amd.tar.xz",
"ES6 CJS": "./dist/cjs.tar.xz",
"ES6 ESM": "./dist/esm.tar.xz",
"ES6 UMD": "./dist/umd.tar.xz",
"Node 10": "./dist/v10.tar.xz",
"Node 12": "./dist/v12.tar.xz",
"Node 14": "./dist/v14.tar.xz",
"React Native": "./dist/react-native.tar.xz",
};
const assets = _.concat(
{ path: "dist/docs.tar.xz", label: "Docs" },
{ path: "LICENSE", label: "License" },
_.map(distributions, (path, label) => ({ path, label }))
);
console.debug(assets);
module.exports = {
branches: [
{ name: "latest" },
"+([0-9])?(.{+([0-9]),x}).x",
{ name: "next", prerelease: "rc" },
],
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/changelog",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
"@semantic-release/npm",
"@semantic-release/git",
"semantic-release-npm-deprecate-old-versions",
],
preset: "conventionalcommits",
tarballDir: "dist",
changelogFile: "CHANGELOG.md",
changelogTitle: `${name} Changelog`,
assets,
};