forked from sircharlo/meeting-media-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (79 loc) · 2.24 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: ci
on:
workflow_dispatch:
pull_request:
branches: [main, master]
push:
branches: [main, master, refactor/next]
paths:
- 'electron-builder.yml'
- 'electron-builder-dev.yml'
- 'package.json'
- 'electron/**/*'
- 'nuxt.config.ts'
- 'tests/**/*'
- 'yarn.lock'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: 'package.json'
cache: 'yarn'
- name: Install dependencies
run: PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 yarn install
- name: Run linter
run: |
yarn prepare
yarn lint
- name: Cancel workflow
if: failure()
uses: andymckay/cancel-action@0.3
test:
uses: ./.github/workflows/build.yml
with:
type: test
secrets: inherit
build:
uses: ./.github/workflows/build.yml
with:
type: release
secrets: inherit
release:
if: |
github.event_name == 'push' &&
!startsWith(github.ref, 'refs/tags/v') &&
startsWith(github.event.head_commit.message, 'chore(release)')
runs-on: ubuntu-latest
needs: [lint, test, build]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get version
id: version
uses: martinbeentjes/npm-get-version-action@v1.3.1
- name: Publish release
uses: ncipollo/release-action@v1
with:
name: ${{ format('v{0}', steps.version.outputs.current-version) }}
tag: ${{ format('v{0}', steps.version.outputs.current-version) }}
draft: false
allowUpdates: true
omitBodyDuringUpdate: true
skipIfReleaseExists: true
updateOnlyUnreleased: true
token: ${{ secrets.PERSONAL_TOKEN }}
- name: Delete older beta releases
uses: dev-drprasad/delete-older-releases@v0.3.2
with:
keep_latest: 0
delete_tag_pattern: beta
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}