fix: cursor added the comments to every stencil block. (#20) #155
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build-release | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - edited | |
| - synchronize | |
| push: | |
| branches: | |
| - "main" | |
| paths: | |
| - "stencil.yaml" | |
| - "manifest.yaml" | |
| - ".mise.toml" | |
| - ".github/workflows/build-release.yml" | |
| - "templates/**" | |
| - "tests/**" | |
| jobs: | |
| build-and-test: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| actions: read | |
| steps: | |
| # Add CI secret/auth steps here (e.g. configure AWS, custom tokens). | |
| ## <<Stencil::Block(getMoreCiSecrets)>> | |
| ## <</Stencil::Block>> | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| # These two required for builds to successfully amend commits | |
| ref: ${{ github.head_ref }} | |
| fetch-depth: 2 | |
| - name: Install Tool Versions | |
| uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 | |
| with: | |
| experimental: true | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install once | |
| uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 | |
| with: | |
| repo: jaredallard/once | |
| - name: Install Stencil | |
| uses: rgst-io/stencil-action@34abb7be7ca3847f233bd9c38f1da71b30556c35 | |
| with: | |
| github-token: ${{ github.token }} | |
| version: "latest" | |
| # Add auth steps for build/test here (e.g. login to private registry). | |
| ## <<Stencil::Block(buildtestauth)>> | |
| ## <</Stencil::Block>> | |
| - 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. | |
| ## <<Stencil::Block(buildTestEnvVars)>> | |
| ## <</Stencil::Block>> | |
| - 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. | |
| ## <<Stencil::Block(runTestEnvVars)>> | |
| ## <</Stencil::Block>> | |
| - name: Install JS Deps | |
| run: pnpm install | |
| - name: Update README.md if needed | |
| 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. | |
| ## <<Stencil::Block(readmeUpdateGhToken)>> | |
| GH_TOKEN: ${{ github.token }} | |
| ## <</Stencil::Block>> | |
| - name: Commit back any changes | |
| 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). | |
| ## <<Stencil::Block(buildteststeps)>> | |
| ## <</Stencil::Block>> | |
| build-release: | |
| name: Build and Release | |
| if: ${{ github.ref == 'refs/heads/main' }} # Only run on main branch commits | |
| needs: build-and-test | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set git User | |
| run: | | |
| git config user.name github-actions | |
| git config user.email github-actions@github.com | |
| - name: Install Tool Versions | |
| uses: jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 | |
| with: | |
| experimental: true | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install once | |
| uses: jaxxstorm/action-install-gh-release@6096f2a2bbfee498ced520b6922ac2c06e990ed2 | |
| with: | |
| repo: jaredallard/once | |
| - name: Install JS Deps | |
| run: pnpm install | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: npx semantic-release | |
| # Add additional workflow jobs here (alongside build-and-test and build-release). | |
| ## <<Stencil::Block(extraActions)>> | |
| ## <</Stencil::Block>> |