-
-
Notifications
You must be signed in to change notification settings - Fork 202
67 lines (64 loc) · 2.04 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
name: CI
on: push
jobs:
build:
name: Build
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
persist-credentials: 'false'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Build artifacts
run: |
npm run build:prod:zip:chrome
npm run build:prod:zip:edge
npm run build:prod:zip:firefox
npm run build:prod:zip:opera
ENABLE_CONTRIBUTIONS=false npm run build:prod:zip:safari
ENABLE_CONTRIBUTIONS=false npm run build:prod:zip:samsung
- name: Hash artifacts
run: sha256sum artifacts/*/*
if: startsWith(github.ref, 'refs/tags/v')
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/v')
with:
name: artifacts
path: artifacts/
retention-days: 1
release:
name: Release on GitHub
runs-on: ubuntu-22.04
needs: [build]
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: artifacts/
- name: Hash artifacts
run: sha256sum artifacts/*/*
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body: |
Download and install the extension from the [extension store](https://github.com/dessant/search-by-image#readme) of your browser.
Learn more about this release from the [changelog](https://github.com/dessant/search-by-image/blob/main/CHANGELOG.md#changelog).
files: artifacts/*/*
fail_on_unmatched_files: true
draft: true