name: Release on: workflow_dispatch: inputs: npm_tag: type: choice description: 'Specify npm tag' required: true default: 'alpha' options: - alpha - beta - rc - canary - latest branch: description: 'Branch to release' required: true default: 'main' permissions: {} jobs: release: name: Release if: github.repository == 'web-infra-dev/rspress' && github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest environment: npm permissions: contents: read # Provenance generation in GitHub Actions requires "write" access to the "id-token" id-token: write steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 1 ref: ${{ github.event.inputs.branch }} - name: Install Pnpm run: | npm install -g corepack@latest --force corepack enable - name: Setup Node.js uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version-file: '.nvmrc' package-manager-cache: false - name: Install Dependencies && Build run: pnpm install - name: Publish to npm run: | pnpm --filter './packages/*' -r stage publish --tag ${{ github.event.inputs.npm_tag }} --no-git-checks