@eclipse-docks/create-app 0.7.114 → 0.7.118
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +5 -0
- package/package.json +1 -1
- package/template/.github/workflows/release.yml +16 -0
- package/template/README.md +1 -0
- package/template/package.json +5 -1
package/index.js
CHANGED
|
@@ -78,6 +78,11 @@ function main() {
|
|
|
78
78
|
readme = readme.replace(/\{\{APP_NAME\}\}/g, appName);
|
|
79
79
|
writeFileSync(readmePath, readme);
|
|
80
80
|
|
|
81
|
+
const releaseWorkflowPath = join(targetDir, '.github', 'workflows', 'release.yml');
|
|
82
|
+
let releaseWorkflow = readFileSync(releaseWorkflowPath, 'utf8');
|
|
83
|
+
releaseWorkflow = releaseWorkflow.replace(/\{\{APP_NAME\}\}/g, appName);
|
|
84
|
+
writeFileSync(releaseWorkflowPath, releaseWorkflow);
|
|
85
|
+
|
|
81
86
|
const gitignoreSrc = join(targetDir, '_gitignore');
|
|
82
87
|
if (existsSync(gitignoreSrc)) {
|
|
83
88
|
writeFileSync(join(targetDir, '.gitignore'), readFileSync(gitignoreSrc, 'utf8'));
|
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
permissions:
|
|
11
|
+
contents: write
|
|
12
|
+
uses: eclipse-docks/core/.github/workflows/app-release.yml@main
|
|
13
|
+
with:
|
|
14
|
+
base_path: /{{APP_NAME}}/
|
|
15
|
+
publish_dir: ./packages/app/dist
|
|
16
|
+
secrets: inherit
|
package/template/README.md
CHANGED
|
@@ -15,6 +15,7 @@ Then open the URL shown in the terminal (e.g. https://localhost:5173/).
|
|
|
15
15
|
- **dev** – Start the development server
|
|
16
16
|
- **build** – Build for production
|
|
17
17
|
- **preview** – Preview the production build locally
|
|
18
|
+
- **release** – Create a version-release commit (`docks release`); pushing it triggers `.github/workflows/release.yml`, which tags, creates a GitHub Release, and deploys to GitHub Pages
|
|
18
19
|
|
|
19
20
|
## Structure
|
|
20
21
|
|
package/template/package.json
CHANGED
|
@@ -6,6 +6,10 @@
|
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "npm run dev -w {{APP_NAME}}",
|
|
8
8
|
"build": "npm run build -w {{APP_NAME}}",
|
|
9
|
-
"preview": "npm run preview -w {{APP_NAME}}"
|
|
9
|
+
"preview": "npm run preview -w {{APP_NAME}}",
|
|
10
|
+
"release": "docks release"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@eclipse-docks/cli": "^0.x"
|
|
10
14
|
}
|
|
11
15
|
}
|