Skip to content

Commit d116bb7

Browse files
authored
Update distribute.yml
1 parent 2b1234c commit d116bb7

1 file changed

Lines changed: 30 additions & 31 deletions

File tree

.github/workflows/distribute.yml

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,31 @@ on:
2424
type: boolean
2525
env:
2626
REACT_APP_BUILD_TARGET: 'extension'
27-
REACT_APP_AMPLITUDE_URL: ${{ secrets.REACT_APP_AMPLITUDE_URL }}
28-
REACT_APP_AMPLITUDE_KEY: ${{ secrets.REACT_APP_AMPLITUDE_KEY }}
27+
2928
jobs:
30-
29+
install-dependencies:
30+
needs: tag_version
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v2
34+
with:
35+
ref: master
36+
- uses: actions/cache@v2
37+
with:
38+
path: '**/node_modules'
39+
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
40+
- name: Install yarn dependencies
41+
run: yarn
42+
- name: Build and zip the extension
43+
run: |
44+
echo version=${{ steps.tag_version.outputs.new_version }}
45+
if [ ${{github.event.inputs.targetStore}} == 'chrome' ] || [ ${{github.event.inputs.targetStore}} == 'all' ]; then
46+
yarn build-chrome
47+
fi
48+
if [ ${{github.event.inputs.targetStore}} == 'firefox' ] || [ ${{github.event.inputs.targetStore}} == 'all' ]; then
49+
yarn build-firefox
50+
fi
51+
3152
tag_version:
3253
runs-on: ubuntu-latest
3354
steps:
@@ -53,21 +74,10 @@ jobs:
5374
message: "Bump manifest version"
5475

5576
chrome-deploy:
56-
runs-on: ubuntu-latest
5777
if: ${{ (github.event.inputs.targetStore == 'chrome') || (github.event.inputs.targetStore == 'all') }}
58-
needs: tag_version
59-
steps:
60-
- uses: actions/checkout@v2
61-
with:
62-
ref: master
63-
- uses: actions/cache@v2
64-
with:
65-
path: '**/node_modules'
66-
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
67-
- name: Install yarn dependencies
68-
run: yarn
69-
- name: Build and zip the extension
70-
run: yarn build-chrome
78+
needs: install-dependencies
79+
runs-on: ubuntu-latest
80+
steps:
7181
- name: Install chrome dependencies
7282
run: yarn global add chrome-webstore-upload-cli
7383

@@ -80,23 +90,12 @@ jobs:
8090
run: chrome-webstore-upload upload --source dist/chrome_extension.zip --extension-id $EXTENSION_ID --auto-publish
8191

8292
firefox-deploy:
83-
runs-on: ubuntu-latest
8493
if: ${{ (github.event.inputs.targetStore == 'firefox') || (github.event.inputs.targetStore == 'all') }}
85-
needs: tag_version
94+
needs: install-dependencies
95+
runs-on: ubuntu-latest
8696
steps:
87-
- uses: actions/checkout@v2
88-
with:
89-
ref: master
90-
- uses: actions/cache@v2
91-
with:
92-
path: '**/node_modules'
93-
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
94-
- name: Install yarn dependencies
95-
run: yarn
96-
- name: Build and zip the extension
97-
run: yarn build-firefox
9897
- name: Install Firefox dependencies
99-
run: yarn global add web-ext web-ext-submit@7
98+
run: yarn global add web-ext web-ext-submit@6
10099

101100
- name: Upload the package to Firefox web store
102101
if: ${{ github.event.inputs.testMode == 'false' }}

0 commit comments

Comments
 (0)