-
Notifications
You must be signed in to change notification settings - Fork 211
58 lines (50 loc) · 1.99 KB
/
publish-packages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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: 1
env:
CI: true
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 'lts/*'
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
- name: Get pnpm cache info
id: pnpm-cache
shell: bash
run: echo "store=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache/restore@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
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@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
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@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
if: always()
with:
path: ./cache
key: pacote-cache-${{ github.run_id }}-${{ github.run_attempt }}
- run: pnpm store prune
- uses: actions/cache/save@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
with:
path: ${{ steps.pnpm-cache.outputs.store }}
key: ${{ runner.os }}-pnpm-store-cache-${{ github.run_id }}-${{ github.run_attempt }}