diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index bc1a643..b700c4b 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -26,6 +26,7 @@ jobs: contents: write actions: read steps: + # Add CI secret/auth steps here (e.g. configure AWS, custom tokens). ## <> ## <> @@ -51,17 +52,20 @@ jobs: with: github-token: ${{ github.token }} version: "latest" + # Add auth steps for build/test here (e.g. login to private registry). ## <> ## <> - name: Build Test repo run: mise run buildtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies + # Add env vars for the Build Test repo step here. ## <> ## <> - name: Run Tests run: mise run runtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies + # Add env vars for the Run Tests step here. ## <> ## <> @@ -71,6 +75,7 @@ jobs: run: mise run gentable env: # Fill in GH_TOKEN env with a different token here if you need a custom token to read module dependencies + # Override token for README updates here. Default: GH_TOKEN from github.token. ## <> GH_TOKEN: ${{ github.token }} ## <> @@ -78,6 +83,7 @@ jobs: uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 #v5 with: commit_message: Update README.md manifest options table + # Add extra build/test steps here (run after standard build and test). ## <> ## <> @@ -116,6 +122,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: npx semantic-release + # Add additional workflow jobs here (alongside build-and-test and build-release). ## <> ## <> diff --git a/.gitignore b/.gitignore index 2bc9f75..943f551 100644 --- a/.gitignore +++ b/.gitignore @@ -54,6 +54,7 @@ tests/native/* !tests/template tests/template/* !tests/template/stencil.yaml +# Add additional gitignore patterns here (e.g. "*.log", "custom-dir/"). ## <> ## <> diff --git a/.mise.toml b/.mise.toml index 93c562c..c45dd45 100644 --- a/.mise.toml +++ b/.mise.toml @@ -1,6 +1,7 @@ [tools] nodejs = "lts" pnpm = "latest" +# Add additional tool versions here (e.g. rust = "1.75"). Installed via mise alongside defaults. ## <> ## <> @@ -29,6 +30,7 @@ done [tasks.runtest] description = 'Run the tests' dir = "tests" +# Customize test runner: override run command and/or add env vars for the runtest task. ## <> run = """ #!/usr/bin/env bash @@ -43,6 +45,7 @@ mise run test description = 'Generate the README.md table of arguments' run = "node scripts/yamltotable.js" +# Add custom mise tasks here (e.g. [tasks.mytask] description = "...", run = "..."). ## <> ## <> diff --git a/manifest.yaml b/manifest.yaml index 56b7f83..83b33de 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -1,6 +1,7 @@ name: github.com/udemy/stencil-module-base type: templates arguments: + # Add custom Stencil module arguments here. Used in templates when generating projects. ## <> nativeModule: required: false @@ -35,9 +36,11 @@ arguments: description: package.json scripts to add to the generated package.json (key/value map) ## <> modules: + # Add additional Stencil modules to include. Loaded and available during project generation. ## <> ## <> +# Add extra manifest config here (e.g. postRunCommand, hooks). ## <> postRunCommand: - name: Install/Update pnpm deps to lockfile diff --git a/templates/.github/workflows/build-release.yml.tpl b/templates/.github/workflows/build-release.yml.tpl index bb3ca86..488c554 100644 --- a/templates/.github/workflows/build-release.yml.tpl +++ b/templates/.github/workflows/build-release.yml.tpl @@ -36,6 +36,7 @@ jobs: contents: write actions: read steps: + # Add CI secret/auth steps here (e.g. configure AWS, custom tokens). ## <> {{ file.Block "getMoreCiSecrets" }} ## <> @@ -79,6 +80,7 @@ jobs: run: mise run build - name: Run Go Tests run: go run gotest.tools/gotestsum@latest + # Add env vars for Go tests here (e.g. TEST_DB_URL). ## <> {{ file.Block "gotestvars" }} ## <> @@ -89,18 +91,21 @@ jobs: with: github-token: {{ "${{ github.token }}" }} version: 'latest' + # Add auth steps for build/test here (e.g. login to private registry). ## <> {{ file.Block "buildtestauth" }} ## <> - name: Build Test repo run: mise run buildtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies + # Add env vars for the Build Test repo step here. ## <> {{ file.Block "buildTestEnvVars" }} ## <> - name: Run Tests run: mise run runtest # Fill in env: -> GITHUB_TOKEN here if you need a custom token to read module dependencies + # Add env vars for the Run Tests step here. ## <> {{ file.Block "runTestEnvVars" }} ## <> @@ -110,6 +115,7 @@ jobs: run: mise run gentable env: # Fill in GH_TOKEN env with a different token here if you need a custom token to read module dependencies + # Override token for README updates here. Default: GH_TOKEN from github.token. ## <> {{- if empty (file.Block "readmeUpdateGhToken") }} GH_TOKEN: {{ "${{ github.token }}" }} @@ -121,6 +127,7 @@ jobs: uses: stefanzweifel/git-auto-commit-action@e348103e9026cc0eee72ae06630dbe30c8bf7a79 #v5 with: commit_message: Update README.md manifest options table + # Add extra build/test steps here (run after standard build and test). ## <> {{ file.Block "buildteststeps" }} ## <> @@ -192,6 +199,7 @@ jobs: args: release --release-notes tempchangelog.md --clean env: GITHUB_TOKEN: {{ "${{ secrets.GITHUB_TOKEN }}" }} + # Add env vars for goreleaser here (e.g. CUSTOM_VAR from secrets). ## <> {{ file.Block "goreleaserEnvVars" }} ## <> @@ -204,6 +212,7 @@ jobs: run: npx semantic-release {{- end }} + # Add additional workflow jobs here (alongside build-and-test and build-release). ## <> {{ file.Block "extraActions" }} ## <> diff --git a/templates/.gitignore.tpl b/templates/.gitignore.tpl index a875bc7..5780a00 100644 --- a/templates/.gitignore.tpl +++ b/templates/.gitignore.tpl @@ -54,6 +54,7 @@ tests/{{ $entry.Name }}/* {{ end -}} {{ end -}} {{ end -}} +# Add additional gitignore patterns here (e.g. "*.log", "custom-dir/"). ## <> {{ file.Block "ignores" }} ## <> diff --git a/templates/.goreleaser.yaml.tpl b/templates/.goreleaser.yaml.tpl index a9a9c41..441142f 100644 --- a/templates/.goreleaser.yaml.tpl +++ b/templates/.goreleaser.yaml.tpl @@ -14,6 +14,7 @@ builds: ldflags: - -s - -w + # Add extra linker flags for the plugin build (e.g. -X main.version=1.0.0). ## <> {{ file.Block "pluginLdflags" }} ## <> @@ -22,6 +23,7 @@ builds: goarch: - amd64 - arm64 + # Add extra architectures to build (e.g. "386", "arm"). Defaults: amd64, arm64. ## <> {{ file.Block "pluginExtraArch" }} ## <> @@ -29,6 +31,7 @@ builds: - linux - darwin - windows + # Add extra OS targets to build (e.g. "freebsd", "openbsd"). Defaults: linux, darwin, windows. ## <> {{ file.Block "pluginExtraOS" }} ## <> diff --git a/templates/.mise.toml.tpl b/templates/.mise.toml.tpl index 30d101c..cd15de0 100644 --- a/templates/.mise.toml.tpl +++ b/templates/.mise.toml.tpl @@ -10,6 +10,7 @@ goreleaser = "latest" "go:golang.org/x/tools/cmd/goimports" = "latest" "go:github.com/thenativeweb/get-next-version" = "latest" {{- end }} +# Add additional tool versions here (e.g. rust = "1.75"). Installed via mise alongside defaults. ## <> {{ file.Block "additionalTools" }} ## <> @@ -75,6 +76,7 @@ done [tasks.runtest] description = 'Run the tests' dir = "tests" +# Customize test runner: override run command and/or add env vars for the runtest task. ## <> {{- if (empty (file.Block "runTests")) }} env = {ENV_VAR_NAME = 'hooray'} # env vars for the script @@ -92,6 +94,7 @@ echo "Tests are running" description = 'Generate the README.md table of arguments' run = "node scripts/yamltotable.js" +# Add custom mise tasks here (e.g. [tasks.mytask] description = "...", run = "..."). ## <> {{ file.Block "tasks" }} ## <> diff --git a/templates/go.mod.tpl b/templates/go.mod.tpl index 9037005..b3afb53 100644 --- a/templates/go.mod.tpl +++ b/templates/go.mod.tpl @@ -5,6 +5,7 @@ module github.com/{{ stencil.Arg "githubOrg" }}/{{ .Config.Name }} go 1.25 +// Add extra Go module dependencies here. If empty, default require block is used; if set, it replaces the default. // <> {{- if empty (trim (file.Block "requires")) }} require ( diff --git a/templates/manifest.yaml.tpl b/templates/manifest.yaml.tpl index b722fbc..787246e 100644 --- a/templates/manifest.yaml.tpl +++ b/templates/manifest.yaml.tpl @@ -9,13 +9,16 @@ type: templates {{- fail "Either templateModule or nativeModule must be true" }} {{- end }} arguments: + # Add custom Stencil module arguments here. Used in templates when generating projects. ## <> {{ file.Block "arguments" }} ## <> modules: + # Add additional Stencil modules to include. Loaded and available during project generation. ## <> {{ file.Block "modules" }} ## <> +# Add extra manifest config here (e.g. postRunCommand, hooks). ## <> {{ file.Block "extra" }} ## <>