name: Release on: workflow_dispatch jobs: release: name: Release runs-on: ubuntu-latest strategy: matrix: node-version: [19.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - name: Checkout uses: actions/checkout@v2 with: persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token fetch-depth: 0 # otherwise, you will failed to push refs to dest repo - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - name: Cache .pnpm-store uses: actions/cache@v1 with: path: ~/.pnpm-store key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }} - name: Install pnpm run: curl -f https://get.pnpm.io/v6.js | node - add --global pnpm@6 - name: Install dependencies run: pnpm install - name: Pre-release run: pnpm pre-release - name: Release env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} run: pnpm semantic-release