-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (40 loc) · 1.16 KB
/
test-docs.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
name: test-docs
permissions:
packages: write
id-token: write
contents: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
workflow_dispatch:
schedule:
- cron: "0 * * * *"
push:
branches:
- "main"
jobs:
test-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: "20.11.1"
- name: Cache Yarn dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('./packages/logger/yarn.lock') }}
- name: Install dependencies
run: yarn
- name: Check @texturehq/events package version
run: >
LATEST=$(yarn info @texturehq/events -A --json | jq '.data["dist-tags"].latest'); \
CURRENT=$(cat package.json | jq '.dependencies["@texturehq/events"]'); \
if [[ "$LATEST" != "$CURRENT" ]]; then \
echo "The @texturehq/events package is outdated"; \
echo "Latest version: $LATEST"; \
echo "Current version: $CURRENT"; \
exit 1; \
fi