-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (79 loc) · 1.96 KB
/
workflow.yml
File metadata and controls
101 lines (79 loc) · 1.96 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Workflow
on:
push:
branches:
- main
- '[0-9]+.x'
tags:
- '*'
jobs:
build:
name: Lint, format, test and build
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7.22.0
- name: Use Node LTS ✨
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: pnpm
- name: Install dependencies 📦️
run: pnpm install --frozen-lockfile
- name: Lint 💅
run: pnpm lint
- name: Format 🔍
run: pnpm format:check
# - name: Test 🧪
# run: pnpm test --passWithNoTests
- name: Build 🔨
run: pnpm build
# Upload artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist
push-dist-files:
name: Commit dist files
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Commit dist files
uses: EndBug/add-and-commit@v9
with:
message: 'chore: update dist files'
add: 'dist/* --force'
test-action:
name: Test Action
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Test Action
uses: ./
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
event-type: test-action
client-payload: '{"ref": "${{ github.ref }}"}'