-
Notifications
You must be signed in to change notification settings - Fork 308
/
release.config.ts
50 lines (42 loc) · 1.49 KB
/
release.config.ts
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
49
50
import type { Options, PluginSpec } from "semantic-release";
const chromePluginSpec: PluginSpec = [
"semantic-release-chrome",
{
asset: "ublacklist-${nextRelease.gitTag}-chrome.zip",
distFolder: "dist/chrome",
extensionId: "pncfbmialoiaghdehhbnbhkkgmjanfhe",
},
];
const amoPluginSpec: PluginSpec = [
"semantic-release-amo",
{
addonId: "ublacklist",
addonDirPath: "dist/firefox",
addonZipPath: "ublacklist-${nextRelease.gitTag}-firefox.zip",
approvalNotes: `To build this add-on, pnpm>=9.7.0 or corepack (currently distributed with Node.js) is required.
If you use corepack, please run \`corepack enable\` in advance.
$ cat << EOF > .env
DROPBOX_API_KEY=${process.env.DROPBOX_API_KEY}
DROPBOX_API_SECRET=${process.env.DROPBOX_API_SECRET}
GOOGLE_DRIVE_API_KEY=${process.env.GOOGLE_DRIVE_API_KEY}
GOOGLE_DRIVE_API_SECRET=${process.env.GOOGLE_DRIVE_API_SECRET}
EOF
$ pnpm install
$ pnpm build --browser firefox --version \${nextRelease.version}
The add-on will be built into dist/firefox.
`,
compatibility: ["firefox", "android"],
submitReleaseNotes: true,
submitSource: true,
},
];
const config: Options = {
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
...(process.env.DEPLOY_CHROME === "true" ? [chromePluginSpec] : []),
...(process.env.DEPLOY_FIREFOX === "true" ? [amoPluginSpec] : []),
["@semantic-release/github", { assets: ["*.zip"], addReleases: "bottom" }],
],
};
export default config;