test: add check for inherited Object property names in StrEnum #176
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: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: Version bump | |
| required: true | |
| type: choice | |
| options: | |
| - patch | |
| - minor | |
| - major | |
| jobs: | |
| lint: | |
| runs-on: [ubuntu-latest] | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| lfs: true | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 20 | |
| - run: npm install | |
| - run: npm run lint | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| # See https://github.com/nodejs/release#release-schedule | |
| node-version: [20, 22, 24, 25] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| lfs: true | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - run: npm install | |
| - run: npm run test | |
| publish: | |
| runs-on: ubuntu-24.04 | |
| needs: [lint, build] | |
| if: ${{ github.event_name == 'workflow_dispatch' }} | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: write # Required for release-it to create tags/commits | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 # Need full history for release-it | |
| lfs: true | |
| # setup-node with registry-url is required for OIDC trusted publishing | |
| - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| node-version: 20 | |
| cache: "npm" | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Set up SSH signing | |
| uses: photostructure/git-ssh-signing-action@eb48d0517cdf304a5fde87d539702a74ebc01e09 # v2.0.0 | |
| with: | |
| ssh-signing-key: ${{ secrets.SSH_SIGNING_KEY }} | |
| git-user-name: ${{ secrets.GIT_USER_NAME }} | |
| git-user-email: ${{ secrets.GIT_USER_EMAIL }} | |
| - name: Update npm to latest | |
| run: | | |
| echo "Current npm version:" | |
| npm --version | |
| echo "Updating npm to latest..." | |
| npm install -g npm@latest | |
| echo "New npm version:" | |
| npm --version | |
| - name: Install dependencies | |
| run: npm ci | |
| # Note: Tests are run by release-it's before:init hook via npm run lint | |
| # This avoids running the full test matrix (9+ OS/Node combinations) in the release workflow | |
| # The lint script is sufficient for release validation since full tests already passed | |
| - name: Release with release-it | |
| run: npm run release -- --ci ${{ github.event.inputs.version }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |