Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29d3705073 | ||
|
|
df0d7a4fe3 |
@@ -31,7 +31,9 @@ jobs:
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build -- --define SimApiVersion="'${{github.ref_name}}'"
|
||||
env:
|
||||
SimApiVersion: ${{ github.ref_name }}
|
||||
run: npm run build
|
||||
|
||||
- name: Publish to npm
|
||||
run: npm publish --access public
|
||||
@@ -13,5 +13,10 @@ export default defineConfig({
|
||||
rollupOptions: {
|
||||
// 不再需要 external,使用原生 fetch
|
||||
}
|
||||
},
|
||||
define: {
|
||||
// SimApiVersion 由构建注入,AppVersion 留给调用方 APP 注入
|
||||
// 使用方式: npm run build -- --SimApiVersion=1.0.0
|
||||
'SimApiVersion': JSON.stringify(process.env.npm_config_SimApiVersion || '0.0.0-develop'),
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user