-
Notifications
You must be signed in to change notification settings - Fork 11
59 lines (48 loc) · 1.49 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
name: E2E on Chrome
on: [push, pull_request]
jobs:
cypress-run:
name: Cypress
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Use pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- run: pnpm install
- run: pnpm build
- uses: cypress-io/github-action@v5
with:
browser: chrome
- uses: JS-DevTools/npm-publish@v3
id: publish
if: ${{ github.ref == 'refs/heads/main' }}
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./package.json
tag: latest
access: public
dry-run: false
strategy: all
- name: Tag
if: github.ref_name == 'main' && steps.publish.outputs.type
uses: anothrNick/github-tag-action@v1
env:
CUSTOM_TAG: ${{ steps.publish.outputs.version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
if: github.ref_name == 'main' && steps.publish.outputs.type
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.publish.outputs.version }}
body:
'Changelog: https://github.com/iendeavor/object-visualizer/blob/${{ steps.publish.outputs.version
}}/CHANGELOG.md'