-
Notifications
You must be signed in to change notification settings - Fork 6
80 lines (69 loc) · 2.12 KB
/
cd.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: CD
on:
push:
branches:
- main
env:
PNPM_CACHE_FOLDER: .pnpm-store
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
# env stuff
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: node - setup
uses: actions/setup-node@v2
with:
node-version: 14.x
# pnpm stuff
- name: pnpm — install
run: npm i pnpm@latest -g
- name: pnpm - config
run: pnpm config set store-dir $PNPM_CACHE_FOLDER
- name: pnpm - output bin stubs
run: mkdir ./packages/presta/dist && echo "#! /usr/bin/env node" > ./packages/presta/bin.js
- name: pnpm - install
run: pnpm install
# build
- name: lint
run: pnpm lint
- name: build
run: pnpm build
- name: typecheck
run: pnpm typecheck
- name: test
run: pnpm test
# - name: coveralls
# uses: coverallsapp/github-action@master
# with:
# github-token: ${{ secrets.GITHUB_TOKEN }}
# publish to npm
- name: release
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
version: pnpm version-packages
commit: 'chore: version packages'
title: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: deploy - @presta-example/netlify
# env:
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_EXAMPLE_SITE_ID }}
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# run: cd examples/netlify && netlify deploy --prod
# - name: deploy - @presta-example/vercel
# env:
# VERCEL_AUTH_TOKEN: ${{ secrets.VERCEL_AUTH_TOKEN }}
# run: cd examples/vercel && vercel --prod --token $VERCEL_AUTH_TOKEN
# - name: deploy - @presta-example/cloudflare-workers
# uses: cloudflare/wrangler-action@1.3.0
# with:
# apiToken: ${{ secrets.CF_API_TOKEN }}
# preCommands: cd examples/cloudflare-workers