File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88jobs :
99 build :
10- name : build
1110 runs-on : ubuntu-latest
11+ env :
12+ BUILD_LINK : https://github.com/leonhma/obsidian-functionplot/actions/runs/${{ github.run_id }}
1213
1314 steps :
14- - uses : actions/checkout@v2
15+ - uses : actions/checkout@v3
1516
1617 - uses : actions/setup-node@v3
1718 with :
3132 - name : upload dist
3233 uses : actions/upload-artifact@v3.1.0
3334 with :
34- name : dist
35+ name : obsidian-functionplot
3536 path : |
3637 manifest.json
3738 main.js
4041 runs-on : ubuntu-latest
4142 name : test
4243 steps :
43- - uses : actions/checkout@v2
44+ - uses : actions/checkout@v3
4445
4546 - uses : actions/setup-node@v3
4647 with :
5657
5758 lint :
5859 runs-on : ubuntu-latest
59- name : lint:prod
60+ name : lint
6061 steps :
61- - uses : actions/checkout@v2
62+ - uses : actions/checkout@v3
6263
6364 - uses : actions/setup-node@v3
6465 with :
Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ permissions:
1010jobs :
1111 release :
1212 runs-on : ubuntu-latest
13+ env :
14+ BUILD_LINK : https://github.com/leonhma/obsidian-functionplot/releases/tag/${{ github.event.release.tag_name }}
1315
1416 steps :
1517 - name : Setup Node.js environment
1820 node-version : 18
1921
2022 - name : Checkout
21- uses : actions/checkout@v2.4.2
23+ uses : actions/checkout@v3
2224
2325 - name : Install
2426 run : |
4244 # build now, so that no side-effects when build fails and release get deleted
4345 - name : Build
4446 run : |
45- pnpm run build:release
47+ pnpm run build:prod
4648 mkdir obsidian-functionplot
4749 cp main.js manifest.json styles.css obsidian-functionplot
4850 zip -r obsidian-functionplot.zip obsidian-functionplot
Original file line number Diff line number Diff line change 33! * /** /main.js
44data.json
55package-lock.json
6+ yarn.lock
67.nyc_output
78coverage
89.yarn
Original file line number Diff line number Diff line change 77 "license" : " MIT" ,
88 "private" : true ,
99 "scripts" : {
10- "build:release" : " pnpm exec webpack --env production --env includeReleaseLink" ,
1110 "build:prod" : " pnpm exec webpack --env production" ,
1211 "build" : " pnpm exec webpack" ,
1312 "watch" : " pnpm exec webpack --watch" ,
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,10 +5,7 @@ const { execSync } = require("child_process");
55
66module . exports = ( env ) => {
77 const isProd = env . production === true ;
8- console . log ( "isProd" , isProd ) ;
98 const manifest = JSON . parse ( readFileSync ( "manifest.json" , "utf8" ) ) ;
10- const isCI = process . env . CI === "true" ;
11- console . log ( "isCI" , isCI ) ;
129
1310 return {
1411 mode : isProd ? "production" : "development" ,
@@ -69,11 +66,7 @@ module.exports = (env) => {
6966 ? manifest . version
7067 : `${ execSync ( "git rev-parse --short HEAD" ) . toString ( ) . trim ( ) } +`
7168 ) ,
72- BUILD_LINK : JSON . stringify (
73- env . includeReleaseLink === true
74- ? `https://github.com/leonhma/obsidian-functionplot/releases/tag/${ manifest . version } `
75- : ""
76- ) ,
69+ BUILD_LINK : JSON . stringify ( process . env . BUILD_LINK || "" ) ,
7770 } ) ,
7871 ] ,
7972 resolve : {
You can’t perform that action at this time.
0 commit comments