-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (66 loc) · 1.65 KB
/
ci.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
name: ci
on:
push:
branches:
- main
pull_request:
merge_group:
release:
types:
- published
jobs:
build:
name: "build"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: perses/[email protected]
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_npm: true
enable_go: true
- run: npm ci
- run: npm run build
- run: go run ./scripts/build-archive/build-archive.go
- name: store plugin archives
uses: actions/upload-artifact@v4
with:
name: archives
path: |
**/*.tar.gz
!node_modules
lint:
name: "lint"
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- uses: perses/[email protected]
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_npm: true
- run: npm ci
- run: npm run lint
release:
name: "release"
needs: "build"
runs-on: ubuntu-latest
permissions:
contents: write
if: ${{ github.event.release.tag_name }}
env:
GITHUB_TOKEN: ${{ github.TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v4
- uses: perses/[email protected]
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_npm: false
enable_go: true
- name: Download archive
uses: actions/download-artifact@v4
with:
name: archives
- run: go run ./scripts/upload-archive/upload-archive.go -tag=${{ github.event.release.tag_name }}