forked from Cookie-AutoDelete/Cookie-AutoDelete
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (71 loc) · 2.7 KB
/
ci_tag_release.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
name: Tagged Release Distribution
on:
push:
tags:
- 'v[0-9].[0-9]+.[0-9]+'
jobs:
all_jobs:
name: Tests, Builds, Coverage, Release Uploads
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v2.1.5
with:
node-version: '14.x'
- name: Install Dependencies (npm ci)
run: npm ci
- name: Run Tests
run: npm run test -- --verbose
- name: Run Lint
run: npm run lint
- name: Ensure Version is Updated
run: node ./tools/replaceVersionNumber.js
- name: Run Build
id: runbuild
run: |
npm run build
echo "::set-output name=ffxpi::$(ls builds/*Firefox.xpi)"
- name: Archive Production Build Artifacts
if: success()
uses: actions/upload-artifact@v2
with:
name: builds
path: builds
- name: Archive Code Coverage Results
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage
- name: GitHub Releases
id: github_releases
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
builds/Cookie-AutoDelete_*_Chrome.zip
builds/Cookie-AutoDelete_*_Firefox.xpi
body: This is an auto-generated tagged release - Change log will be manually inserted soon! Latest versions have been submitted to the relevant browser extension store for review.
prerelease: ${{ endsWith(github.ref, 'alpha') || endsWith(github.ref, 'beta') }}
- name: Google Chrome WebStore Upload
uses: Passiverecords/chrome-extension-upload-action@1.4.1
if: startsWith(github.ref, 'refs/tags/') && !(endsWith(github.ref, 'alpha') || endsWith(github.ref, 'beta'))
with:
app-id: 'fhcgjolkccmbidfldomjliifgaodjagh'
file-name: 'builds/Cookie-AutoDelete_*_Chrome.zip'
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
publish: false
- name: Mozilla Firefox AMO Upload
uses: trmcnvn/firefox-addon@v1
if: startsWith(github.ref, 'refs/tags/') && !(endsWith(github.ref, 'alpha') || endsWith(github.ref, 'beta'))
with:
api-key: ${{ secrets.FIREFOX_API_KEY }}
api-secret: ${{ secrets.FIREFOX_API_SECRET }}
uuid: 'CookieAutoDelete@kennydo.com'
xpi: ${{ steps.runbuild.outputs.ffxpi }}
manifest: extension/manifest.json