feat(cem-plugin-examples): allow setting example file name with callback #65
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: Checks | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| lint: | |
| if: | | |
| !startsWith(github.event.head_commit.message, 'chore: release v') | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| cache: npm | |
| node-version-file: .nvmrc | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Lint | |
| run: npm run lint | |
| test: | |
| if: | | |
| !startsWith(github.event.head_commit.message, 'chore: release v') | |
| name: Test | |
| needs: lint | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| cache: npm | |
| node-version-file: .nvmrc | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Test | |
| run: npm run test:ci | |
| build: | |
| if: | | |
| !startsWith(github.event.head_commit.message, 'chore: release v') | |
| name: Build | |
| needs: [lint, test] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| cache: npm | |
| node-version-file: .nvmrc | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build | |
| release: | |
| if: | | |
| !startsWith(github.event.head_commit.message, 'chore: release v') && github.ref == 'refs/heads/main' | |
| name: Release | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{secrets.WCP_GITHUB_TOKEN}} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| cache: npm | |
| node-version-file: .nvmrc | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Configure git | |
| run: | | |
| git config user.name "autoreleaser" | |
| git config user.email "release@enke.dev" | |
| - name: Configure npm | |
| run: npm config set //registry.npmjs.org/:_authToken ${{secrets.WCP_NPM_TOKEN}} | |
| - name: Release | |
| run: | | |
| npx release-it --no-npm.publish --no-github.release --github.autoGenerate --git.commitMessage='chore: release v${version}' --git.pushArgs=--follow-tags --ci | |
| env: | |
| GITHUB_TOKEN: ${{secrets.WCP_GITHUB_TOKEN}} | |
| NODE_AUTH_TOKEN: ${{secrets.WCP_NPM_TOKEN}} |