-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrelease.config.js
119 lines (119 loc) · 3.04 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
module.exports = {
branches: [
"main",
{
name: "next",
prerelease: true,
},
{
name: "alpha",
prerelease: true,
},
{
name: "canary",
prerelease: true,
},
],
tagFormat: "${version}",
plugins: [
/**
* Verify that the commit messages follow commit message conventions
*/
"@semantic-release/commit-analyzer",
/**
* Generate release notes based on the commit messages
*/
"@semantic-release/release-notes-generator",
/**
* Replace the version in the source code with the new version
*/
[
"@google/semantic-release-replace-plugin",
{
replacements: [
{
files: ["version.ts"],
from: 'const VERSION = ".*";',
to: 'const VERSION = "${nextRelease.version}";',
results: [
{
file: "version.ts",
hasChanged: true,
numMatches: 1,
numReplacements: 1,
},
],
countMatches: true,
},
{
files: ["version.ts"],
from: 'const COMMIT = ".*";',
to: 'const COMMIT = "${nextRelease.gitHead}";',
results: [
{
file: "version.ts",
hasChanged: true,
numMatches: 1,
numReplacements: 1,
},
],
countMatches: true,
},
],
},
],
/**
* Compile the binaries for the release
*/
[
"@semantic-release/exec",
{
execCwd: ".",
prepareCmd: [
`deno task compile`,
`cd bin/linux`,
`zip -9 pspace-linux.zip pspace`,
`cd ../macos`,
`zip -9 pspace-macos.zip pspace`,
`cd ../macos-arm`,
`zip -9 pspace-macos-arm.zip pspace`,
`cd ../windows`,
`zip -9 pspace-windows.zip pspace.exe`,
].join(" &&\\\n"),
},
],
/**
* Create a new release on GitHub, publish release notes, and upload binaries
*/
[
"@semantic-release/github",
{
// DO NOT CHANGE THIS unless you know what you're doing. Things like
// the `upgrade` command depend on these names and paths.
assets: [
{
path: "bin/linux/pspace-linux.zip",
name: "pspace-linux.zip",
label: "Download Paperspace for Linux",
},
{
path: "bin/macos/pspace-macos.zip",
name: "pspace-macos.zip",
label: "Download Paperspace for macOS x64 (Intel)",
},
{
path: "bin/macos-arm/pspace-macos-arm.zip",
name: "pspace-macos-arm.zip",
label:
"Download Paperspace for macOS ARM (Apple silicon, e.g. M1/M2)",
},
{
path: "bin/windows/pspace-windows.zip",
name: "pspace-windows.zip",
label: "Download Paperspace for Windows",
},
],
},
],
],
};