File tree Expand file tree Collapse file tree 5 files changed +10354
-2
lines changed Expand file tree Collapse file tree 5 files changed +10354
-2
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ const config = async (env): Promise<Configuration> => ({
86
86
loader : 'swc-loader' ,
87
87
options : {
88
88
jsc : {
89
- baseUrl : './ src',
89
+ baseUrl : path . resolve ( __dirname , ' src') ,
90
90
target : 'es2015' ,
91
91
loose : false ,
92
92
parser : {
Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ push :
5
+ branches : [ "main", "build-test" ]
6
+ workflow_dispatch :
7
+ inputs :
8
+ release :
9
+ description : ' Make a release build'
10
+ required : false
11
+ type : boolean
12
+
13
+ jobs :
14
+
15
+ build :
16
+ name : Build
17
+ runs-on : ubuntu-latest
18
+ steps :
19
+ - name : Set up yarn
20
+ uses : DerYeger/yarn-setup-action@master
21
+ with :
22
+ node-version : 16.14.0
23
+
24
+ - name : Build yarn
25
+ run : |
26
+ yarn build
27
+ pwd
28
+ ls -la ./dist
29
+
30
+ - name : Set up Go
31
+ uses : actions/setup-go@v4
32
+ with :
33
+ go-version : ' 1.20'
34
+
35
+ - name : Build go
36
+ run : |
37
+ go run mage.go
38
+ ls -la ./dist
39
+
40
+ - name : Zip artifacts
41
+ run : |
42
+ yarn zip
43
+ ls -la
44
+
45
+ - uses : actions/upload-artifact@v3
46
+ name : Attatch artifacts to job
47
+ with :
48
+ name : sasesp-plugin-zip-files
49
+ path : ./sasesp-plugin*.zip
50
+ retention-days : 7
51
+
52
+ - name : Bump version and push tag
53
+ if : startsWith(github.event.head_commit.message, 'release:')
54
+ id : tag_version
55
+ uses :
mathieudutour/[email protected]
56
+ with :
57
+ github_token : ${{ secrets.GITHUB_TOKEN }}
58
+
59
+ - name : Create a GitHub release
60
+ if : startsWith(github.event.head_commit.message, 'release:')
61
+ uses : ncipollo/release-action@v1
62
+ with :
63
+ tag : ${{ steps.tag_version.outputs.new_tag }}
64
+ name : Release ${{ steps.tag_version.outputs.new_tag }}
65
+ body : ${{ steps.tag_version.outputs.changelog }}
66
+ artifacts : " ./sasesp-plugin*.zip"
Original file line number Diff line number Diff line change
1
+ var zip = require ( 'bestzip' ) ;
2
+ var packageJson = require ( './package.json' ) ;
3
+
4
+ zip ( {
5
+ source : packageJson . name + '/*' ,
6
+ destination : './' + packageJson . name + '-' + packageJson . version + '.zip'
7
+ } ) . then ( function ( ) {
8
+ console . log ( 'Zip complete.' ) ;
9
+ } ) . catch ( function ( err ) {
10
+ console . error ( err . stack ) ;
11
+ process . exit ( 1 ) ;
12
+ } ) ;
13
+
14
+ zip ( {
15
+ source : packageJson . name + '-all' + '/*' ,
16
+ destination : './' + packageJson . name + '-' + packageJson . version + '-all' + '.zip'
17
+ } ) . then ( function ( ) {
18
+ console . log ( 'Zip complete.' ) ;
19
+ } ) . catch ( function ( err ) {
20
+ console . error ( err . stack ) ;
21
+ process . exit ( 1 ) ;
22
+ } ) ;
Original file line number Diff line number Diff line change 15
15
"test" : " jest --watch --onlyChanged" ,
16
16
"test:ci" : " jest --passWithNoTests --maxWorkers 4" ,
17
17
"typecheck" : " tsc --noEmit" ,
18
- "zip" : " cp dist sas-esp-grafana- plugin && bestzip sas-esp-grafana- plugin.zip sas-esp-grafana- plugin"
18
+ "zip" : " cp -r dist sasesp-plugin && rm ./sasesp- plugin/*darwin* && rm ./sasesp- plugin/*windows* && rm ./sasesp-plugin/*arm* && cp -r dist sasesp- plugin-all && node makezip.js "
19
19
},
20
20
"license" : " Apache-2.0" ,
21
21
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments