2
2
This file contains the configuration for semantic release, the library we use to tag the correct
3
3
semantic version numbers onto releases. We have two release paths, one on main and one on release branch.
4
4
5
- In the code below we check the env variable RELEASE_BRANCH to decide what we should do. As of
5
+ In the code below we check the env variable RELEASE_TYPE to decide what we should do. As of
6
6
the time of this file semantic release does not support specifying a config file from their CLI,
7
7
so this is the only we can have dynamic configs based on branch.
8
8
9
9
To test run this file, first get a github token at https://github.com/settings/tokens
10
- and add it to the GITHUB_TOKEN env variable then specify what branch you want to run (main or release ) under RELEASE_BRANCH
10
+ and add it to the GITHUB_TOKEN env variable then specify what kind of release ou want to run (production or alpha ) under RELEASE_TYPE
11
11
12
12
$ export GITHUB_TOKEN=<token>
13
- $ export RELEASE_BRANCH=<main or release >
13
+ $ export RELEASE_TYPE=<production or alpha >
14
14
$ run yarn run semantic-release -d
15
15
16
16
@@ -100,7 +100,7 @@ const execSentryReleaseSetting = [
100
100
] ;
101
101
102
102
let plugins ;
103
- if ( process . env && process . env . RELEASE_BRANCH === 'release ' ) {
103
+ if ( process . env && process . env . RELEASE_TYPE === 'production ' ) {
104
104
plugins = [
105
105
commitAnalyzerSetting ,
106
106
execSentryReleaseSetting ,
@@ -120,10 +120,7 @@ if (process.env && process.env.RELEASE_BRANCH === 'release') {
120
120
121
121
module . exports = {
122
122
// define a main version release branch even though we are doing all releases from main
123
- // this branch list gets overwritten in the production release Github Action
124
- branches : [
125
- 'release' ,
126
- { name : 'main' , prerelease : 'alpha' }
127
- ] ,
123
+ // this branch list gets overwritten in the production release Github Action
124
+ branches : [ 'release' , { name : 'main' , prerelease : 'alpha' } ] ,
128
125
plugins,
129
126
} ;
0 commit comments