This repository was archived by the owner on Oct 1, 2024. It is now read-only.
File tree 2 files changed +9
-17
lines changed
2 files changed +9
-17
lines changed Original file line number Diff line number Diff line change 53
53
- name : scripts
54
54
run : |
55
55
gulp tslint
56
- gulp genAikey
57
56
vsce package
58
57
- name : run tests
59
58
if : ${{ matrix.os != 'windows-latest' }}
93
92
- name : scripts
94
93
run : |
95
94
gulp tslint
96
- gulp genAikey
97
95
vsce package
98
96
- name : upload .vsix to github tag
99
97
uses : svenstaro/upload-release-action@v2
@@ -111,4 +109,8 @@ jobs:
111
109
fi
112
110
- name : publish
113
111
if : steps.check-version.outputs.ISPRODUCTION == 'true'
114
- run : vsce publish -p ${{ secrets.VSCE_TOKEN }}
112
+ env :
113
+ PROD_AIKEY : ${{ secrets.PROD_AIKEY }}
114
+ run : |
115
+ gulp genAikey
116
+ vsce publish -p ${{ secrets.VSCE_TOKEN }}
Original file line number Diff line number Diff line change @@ -81,20 +81,10 @@ gulp.task("clean", (done) => {
81
81
} ) ;
82
82
83
83
gulp . task ( "genAikey" , ( done ) => {
84
- if ( process . env . TRAVIS_TAG ) {
85
- const ISPROD = / ^ v ? [ 0 - 9 ] + \. [ 0 - 9 ] + \. [ 0 - 9 ] + $ / . test ( process . env . TRAVIS_TAG || "" ) ;
86
- const packageJson = JSON . parse ( fs . readFileSync ( "package.json" ) ) ;
87
- if ( ISPROD ) {
88
- packageJson . aiKey = process . env [ "PROD_AIKEY" ] ;
89
- } else {
90
- packageJson . aiKey = process . env [ "INT_AIKEY" ] || packageJson . aiKey ;
91
- }
92
- fs . writeFileSync ( "package.json" , JSON . stringify ( packageJson , null , 2 ) + "\n" ) ;
93
- done ( ) ;
94
- } else {
95
- log ( "Skipping genAiKey" ) ;
96
- done ( ) ;
97
- }
84
+ const packageJson = JSON . parse ( fs . readFileSync ( "package.json" ) ) ;
85
+ packageJson . aiKey = process . env . PROD_AIKEY ;
86
+ fs . writeFileSync ( "package.json" , JSON . stringify ( packageJson , null , 2 ) + "\n" ) ;
87
+ done ( ) ;
98
88
} ) ;
99
89
100
90
gulp . task ( "test" , ( done ) => {
You can’t perform that action at this time.
0 commit comments