-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (42 loc) · 1.6 KB
/
pull-request.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
name: Pull Request
on:
pull_request:
types: [opened, synchronize]
jobs:
check-version-increase:
name: Check version tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
- run: npx auto pr-check --url https://github.com/$GITHUB_REPOSITORY
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish-canary:
name: Publish a Canary version
needs: check-version-increase
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
- uses: actions/cache@main
id: cache-modules
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@main
if: steps.cache-modules.outputs.cache-hit != 'true'
with:
path: ~/.npm
key: ${{ runner.os }}-node-global
- run: npm ci
if: steps.cache-modules.outputs.cache-hit != 'true'
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm run build
- run: npx auto shipit
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}