-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrelease.config.mjs
More file actions
40 lines (40 loc) · 2.17 KB
/
release.config.mjs
File metadata and controls
40 lines (40 loc) · 2.17 KB
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
/**
* @type {import('semantic-release').GlobalConfig}
*/
export default {
branches: ["main", {name: 'beta', prerelease: true}, {name: 'alpha', prerelease: true}],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/exec",
{
"prepareCmd": [
// Build and pack NuGet global tool
"dotnet pack AssetBundleBuilder/AssetBundleBuilder.csproj -c Release -p:PackageVersion=${nextRelease.version}",
// Publish platform-specific builds
"dotnet publish AssetBundleBuilder/AssetBundleBuilder.csproj -c Release -r win-x64 --self-contained -p:PublishSingleFile=true -o ./publish/win-x64",
"dotnet publish AssetBundleBuilder/AssetBundleBuilder.csproj -c Release -r linux-x64 --self-contained -p:PublishSingleFile=true -o ./publish/linux-x64",
"dotnet publish AssetBundleBuilder/AssetBundleBuilder.csproj -c Release -r osx-x64 --self-contained -p:PublishSingleFile=true -o ./publish/osx-x64",
// Create zips directory
"mkdir -p zips",
// Create platform-specific zips using Linux commands
"cd publish/win-x64 && zip -r ../../zips/AssetBundleBuilder-win-x64-v${nextRelease.version}.zip . && cd ../..",
"cd publish/linux-x64 && zip -r ../../zips/AssetBundleBuilder-linux-x64-v${nextRelease.version}.zip . && cd ../..",
"cd publish/osx-x64 && zip -r ../../zips/AssetBundleBuilder-osx-x64-v${nextRelease.version}.zip . && cd ../.."
].join(" && "),
"publishCmd": `dotnet nuget push AssetBundleBuilder/bin/Release/*.nupkg --api-key ${process.env.NUGET_API_KEY} --source https://api.nuget.org/v3/index.json --skip-duplicate`
}
],
[
"@semantic-release/github",
{
"assets": [
{path: './zips/*.zip'},
{path: './AssetBundleBuilder/bin/Release/*.nupkg'}
]
}
]
],
tagFormat: "v${version}",
};