-
Notifications
You must be signed in to change notification settings - Fork 34
52 lines (49 loc) · 1.7 KB
/
build.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
name: build
on: [push, pull_request]
env:
FORCE_COLOR: 3
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '15.2.0'
- run: npm ci
- run: npm run prettier
- run: npm run typecheck
- run: npm run eslint
- run: npm run build
# Upload a build for this branch to download and test
- run: zip -r svg-screenshots-chrome.zip dist
if: always()
- name: Upload Chrome artifact
if: always()
uses: actions/upload-artifact@v2
with:
name: svg-screenshots-chrome
path: svg-screenshots-chrome.zip
- run: zip -r svg-screenshots-firefox.xpi dist
if: always()
- name: Upload Firefox artifact
if: always()
uses: actions/upload-artifact@v2
with:
name: svg-screenshots-firefox
path: svg-screenshots-firefox.xpi
# Release to Chrome and Firefox store on release branch
- name: release
if: github.event_name == 'push' && github.repository_owner == 'felixfbecker' && github.ref == 'refs/heads/release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Google web store
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
GOOGLE_REFRESH_TOKEN: ${{ secrets.GOOGLE_REFRESH_TOKEN }}
# Firefox addons store
FIREFOX_EMAIL: ${{ secrets.FIREFOX_EMAIL }}
FIREFOX_PASSWORD: ${{ secrets.FIREFOX_PASSWORD }}
FIREFOX_TOTP_SECRET: ${{ secrets.FIREFOX_TOTP_SECRET }}
run: npm run semantic-release