aboutsummaryrefslogtreecommitdiffstats
path: root/.release-it.cjs
blob: 5d9d9c22ee1754798963045143813ee879b3f2c1 (plain)
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
"use strict";

const blogURL = process.env.BLOG_URL;

if ( !blogURL || !blogURL.startsWith( "https://blog.jquery.com/" ) ) {
	throw new Error( "A valid BLOG_URL must be set in the environment" );
}

module.exports = {
	hooks: {
		"before:init": "./build/release/pre-release.sh",
		"before:git:release": "git add -f dist/ dist-module/ changelog.md",
		"after:version:bump":
			"sed -i 's/main/AUTHORS.txt/${version}/AUTHORS.txt/' package.json",
		"after:release": `./build/release/post-release.sh \${version} ${ blogURL }`
	},
	git: {
		changelog: "npm run release:changelog -- ${from} ${to}",
		commitMessage: "Release: ${version}",
		getLatestTagFromAllRefs: true,
		requireBranch: "main",
		requireCleanWorkingDir: true
	},
	github: {
		release: true,
		tokenRef: "JQUERY_GITHUB_TOKEN"
	},
	npm: {
		publish: true
	}
};