chore(release): prepare v0.2.1 release #202
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: release | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| scope: | ||
| description: "Comma-separated package scope (optional)" | ||
| required: false | ||
| default: "" | ||
| jobs: | ||
| lint: | ||
| uses: ./.github/workflows/linting.yml # reuse if using reusable workflows; else inline | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "lts/*" | ||
| - name: Install | ||
| run: npm ci | ||
| - name: Lint | ||
| run: npm run lint | ||
| release: | ||
| needs: [lint] # hard gate | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| ref: develop | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "lts/*" | ||
| - name: Install | ||
| run: npm ci | ||
| - name: Configure git user | ||
| run: | | ||
| git config user.name "lightspeed-bot" | ||
| git config user.email "ops@lightspeedwp.agency" | ||
| - name: Validate changelog (schema + unreleased content) | ||
| run: | | ||
| node scripts/validation/validate-changelog.cjs CHANGELOG.md | ||
| node scripts/agents/includes/changelogUtils.cjs --unreleased CHANGELOG.md | ||
| - name: Run Release Agent | ||
| run: | | ||
| SCOPE_INPUT="${{ github.event.inputs.scope }}" | ||
| if [ -z "$SCOPE_INPUT" ]; then | ||
| SCOPE_INPUT="patch" | ||
| fi | ||
| node scripts/agents/release.agent.js --scope="$SCOPE_INPUT" | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| - name: Post metrics | ||
| if: always() | ||
| run: echo "metric=release_cycle conclusion=${{ job.status }}" | ||