forked from duckduckgo/duckduckgo-privacy-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.45 KB
/
publish.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
name: Publish Builds
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target: [release-chrome, release-firefox, beta-firefox]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'npm'
- name: Dependencies
run: |
npm run install-ci
npm i -g web-ext
- name: Build
run: |
npm run bundle-config
npm run ${{ matrix.target }}
echo "VERSION=$(jq -r .version ./browsers/firefox/manifest.json)" >> $GITHUB_ENV
- name: Package Firefox Release
if: matrix.target == 'release-firefox'
run: |
cd build/firefox/release && web-ext build
echo "NOTES=Built with node $(node --version) and npm $(npm --version)" >> $GITHUB_ENV
- name: Package Firefox Beta
if: matrix.target == 'beta-firefox'
run: |
mv build/firefox/release/web-ext-artifacts/*.zip build/firefox/release/web-ext-artifacts/duckduckgo_privacy_essentials_beta-$VERSION.zip
- name: Publish
uses: softprops/action-gh-release@9729932bfb75c05ad1f6e3a729294e05abaa7001
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: true
body: ${{ env.NOTES }}
files: |
./build/firefox/release/web-ext-artifacts/*.zip
./build/chrome/release/*.zip