forked from iorate/ublacklist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.config.js
45 lines (39 loc) · 1.28 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
// @ts-check
/** @type { import('semantic-release').PluginSpec } */
const chrome = [
'semantic-release-chrome',
{
asset: 'ublacklist-${nextRelease.gitTag}-chrome-mv3.zip',
distFolder: 'dist/chrome-mv3/production',
extensionId: 'pncfbmialoiaghdehhbnbhkkgmjanfhe',
},
];
/** @type { import('semantic-release').PluginSpec } */
const firefox = [
'semantic-release-amo',
{
addonId: 'ublacklist',
addonDirPath: 'dist/firefox/production',
addonZipPath: 'ublacklist-${nextRelease.gitTag}-firefox.zip',
approvalNotes: `To build this add-on, Node.js and Yarn are required.
NOTE: Node.js 16 or later is required. Node.js 14 cannot build this add-on.
$ yarn
$ yarn build firefox production
The add-on will be built into dist/firefox/production.
`,
compatibility: ['firefox', 'android'],
submitReleaseNotes: true,
submitSource: true,
},
];
/** @type {import('semantic-release').Options } */
const config = {
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
...(process.env.RELEASE_CHROME === 'true' ? [chrome] : []),
...(process.env.RELEASE_FIREFOX === 'true' ? [firefox] : []),
['@semantic-release/github', { assets: ['*.zip'], addReleases: 'bottom' }],
],
};
module.exports = config;