-
Notifications
You must be signed in to change notification settings - Fork 4
79 lines (65 loc) · 2.06 KB
/
build.yaml
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
name: build
on:
workflow_dispatch:
release:
types: [published]
env:
PACKAGE_NAME: link_extractor
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Setup Node 18"
uses: actions/setup-node@v3
with:
node-version: 18
- name: "Node Install"
run: npm install
- name: "Parse Manifest"
id: manifest
run: |
echo "version=$(jq '.version' < src/manifest.json)" >> "$GITHUB_OUTPUT"
- name: "Build Firefox"
id: web-ext-build
uses: kewisch/action-web-ext@v1
with:
cmd: build
source: src
filename: "{name}-{version}.xpi"
- name: "Setup Chrome"
id: setup-chrome
uses: browser-actions/setup-chrome@v1
with:
chrome-version: "1191187"
- name: "Build Chrome"
run: |
echo "${{ secrets.CHROME_PRIVATE_KEY }}" > .key
echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }}
${{ steps.setup-chrome.outputs.chrome-path }} --version
${{ steps.setup-chrome.outputs.chrome-path }} --pack-extension=./src --pack-extension-key=.key
mv src.crx web-ext-artifacts/${{ env.PACKAGE_NAME }}-${{ steps.manifest.outputs.version }}.crx
- name: "Create ZIP Archive"
working-directory: "src"
run: |
ls -lAh .
zip "../web-ext-artifacts/${{ env.PACKAGE_NAME }}-${{ steps.manifest.outputs.version }}.zip" -r .
- name: "Archive Artifacts"
uses: actions/upload-artifact@v3
with:
name: artifacts
path: web-ext-artifacts/
- name: "Upload Artifacts to Release"
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: web-ext-artifacts/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: "Debug"
run: |
ls -l web-ext-artifacts