name: Publish Packages on: workflow_dispatch: schedule: - cron: '*/30 * * * *' # every 30 minutes # publishing can take longer than 30 minutes but we never want to # run more than one publish job at a time concurrency: publish-packages env: CI: true jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 'lts/*' - uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0 - name: Get pnpm cache info id: pnpm-cache shell: bash run: echo "store=$(pnpm store path)" >> $GITHUB_OUTPUT - uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: ${{ steps.pnpm-cache.outputs.store }} key: ${{ runner.os }}-pnpm-store-cache-${{ github.run_id }}-${{ github.run_attempt }} restore-keys: | ${{ runner.os }}-pnpm-store-cache- - run: pnpm install --frozen-lockfile - run: pnpm build - uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: ./cache key: pacote-cache-${{ github.run_id }}-${{ github.run_attempt }} restore-keys: pacote-cache- - run: node packages/publisher/dist/run.js env: GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TYPES_TOKEN: ${{ secrets.NPM_TYPES_TOKEN }} - uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 if: always() with: path: ./cache key: pacote-cache-${{ github.run_id }}-${{ github.run_attempt }} - run: pnpm store prune - uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 with: path: ${{ steps.pnpm-cache.outputs.store }} key: ${{ runner.os }}-pnpm-store-cache-${{ github.run_id }}-${{ github.run_attempt }}