Merge pull request #446 from cipherstash/fix/handle-stdin-not-tty #290
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 JS | |
| # Permissions for the workflow to use Trusted Actions | |
| # See https://docs.npmjs.com/trusted-publishers#supported-cicd-providers | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: write # Required for changesets to commit and push | |
| pull-requests: write # Required for changesets to check existing PRs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@v6 | |
| - uses: pnpm/action-setup@v6 | |
| name: Install pnpm | |
| with: | |
| run_install: false | |
| # Supply-chain hardening — never cache the pnpm store; a poisoned | |
| # cache entry would execute in this credential-bearing workflow. | |
| cache: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 22 | |
| # No `cache:`, and package-manager-cache disabled. release.yml | |
| # publishes to npm (NPM_TOKEN + OIDC) and must not restore the | |
| # GitHub Actions cache — a cache-poisoning / supply-chain vector. | |
| # Enforced by .github/workflows/tests-supply-chain.yml. | |
| package-manager-cache: false | |
| # node-pty's install hook falls back to `node-gyp rebuild` when no | |
| # linux-x64 prebuild matches. pnpm/action-setup v6 no longer ships | |
| # node-gyp on PATH, so install it explicitly. | |
| - name: Install node-gyp | |
| run: npm install -g node-gyp | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Publish to npm | |
| id: changesets | |
| uses: changesets/action@v1.7.0 | |
| with: | |
| publish: pnpm run release | |
| commitMode: 'github-api' | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |