-
Notifications
You must be signed in to change notification settings - Fork 61
60 lines (48 loc) · 1.44 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
name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
- name: Install dependencies
run: npm install
- name: Build plugin
run: npm run build
- name: Test plugin
run: npm run test
- name: Lint plugin (ESLint)
run: npm run lint
- name: Check plugin (Svelte)
run: npm run svelte-check
- name: Update manifest-beta.json
if: github.ref_name == 'main'
run: |
node version-beta-manifest.mjs ${{github.run_number}}
cp manifest-beta.json manifest.json
- name: Create release
if: github.ref_name == 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
tag="0.0.0-${{ github.run_number }}"
gh release create "$tag" \
--title="$tag" \
--prerelease \
main.js manifest.json styles.css
- name: Publish build
if: github.ref_name == 'main'
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add manifest-beta.json
git commit -m "Bump beta version [skip ci]"
git push