release: 0.5.0 (#6) #10
Workflow file for this run
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: Publish npm | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| permissions: {} | |
| concurrency: | |
| group: npm-release-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| publish: | |
| name: Publish Package | |
| if: github.repository == 'Xquik-dev/x-twitter-scraper-typescript' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| environment: npm | |
| permissions: | |
| contents: read | |
| id-token: write # Required for npm trusted publishing and provenance. | |
| steps: | |
| - name: Check out the release tag | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Set up Node.js | |
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 | |
| with: | |
| node-version: "24.18.0" | |
| registry-url: "https://registry.npmjs.org" | |
| package-manager-cache: false | |
| - name: Set up pnpm | |
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | |
| with: | |
| version: "11.15.1" | |
| run_install: false | |
| - name: Verify release context | |
| env: | |
| DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} | |
| EXPECTED_PACKAGE_NAME: x-twitter-scraper | |
| run: .github/scripts/verify-release-context.sh | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Audit dependencies | |
| run: pnpm audit --audit-level high | |
| - name: Check types and formatting | |
| run: pnpm lint | |
| - name: Run tests | |
| run: pnpm test | |
| - name: Build, inspect, and publish | |
| run: bash ./bin/publish-npm |