-
Notifications
You must be signed in to change notification settings - Fork 8
69 lines (62 loc) · 1.94 KB
/
cli.yaml
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
name: cli
on:
workflow_call:
inputs:
release:
type: boolean
required: false
secrets:
NPM_TOKEN:
required: true
TURBO_TOKEN:
required: true
pull_request:
paths:
- .github/workflows/cli.yaml
- apps/cli/**
- packages/contracts/**
- packages/eslint-config/**
- packages/tsconfig/**
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
permissions:
contents: read
packages: write
pull-requests: write
jobs:
build:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Install dependencies
run: pnpm install
- name: Test / Coverage
working-directory: ./apps/cli
run: pnpm run test:coverage
- name: "Report Coverage"
if: always()
uses: davelosert/vitest-coverage-report-action@v2
with:
working-directory: ./apps/cli
- name: Build
run: pnpm build --filter @cartesi/cli
- name: Publish
if: ${{ inputs.release }}
working-directory: ./apps/cli
run: pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}