|
1 | 1 | name: Build |
2 | 2 | on: |
3 | | - - push |
| 3 | + push: |
| 4 | + branches-ignore: |
| 5 | + - 'master' |
4 | 6 | jobs: |
5 | | - Build: |
6 | | - runs-on: ubuntu-latest |
7 | | - strategy: |
8 | | - matrix: |
9 | | - node-version: |
10 | | - - 13.x |
11 | | - steps: |
12 | | - - uses: actions/checkout@v2 |
13 | | - |
14 | | - - name: Cache node modules |
15 | | - uses: actions/cache@v2 |
16 | | - env: |
17 | | - cache-name: cache-node-modules |
18 | | - with: |
19 | | - path: node_modules |
20 | | - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package.json') }}-${{ hashFiles('npm-shrinkwrap.json') }} |
21 | | - restore-keys: | |
22 | | - ${{ runner.os }}-build-${{ env.cache-name }}- |
23 | | - ${{ runner.os }}-build- |
24 | | - ${{ runner.os }}- |
25 | | -
|
26 | | - - name: Install Dependencies |
27 | | - run: npm install |
28 | | - |
29 | | - - name: Build |
30 | | - run: npm run build |
31 | | - |
32 | | - - name: Upload extension as build artifact |
33 | | - uses: actions/upload-artifact@v1 |
34 | | - with: |
35 | | - name: firephp |
36 | | - path: dist/firephp.zip |
37 | | - |
38 | | - - name: Upload Release if tagging |
39 | | - uses: fnkr/github-action-ghr@v1 |
40 | | - if: startsWith(github.ref, 'refs/tags/') |
41 | | - env: |
42 | | - GHR_PATH: dist/firephp.zip |
43 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 7 | + Build: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + strategy: |
| 10 | + matrix: |
| 11 | + node-version: |
| 12 | + - 13.x |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v2 |
| 15 | + with: |
| 16 | + fetch-depth: 0 |
| 17 | + |
| 18 | + - name: Cache node modules |
| 19 | + uses: actions/cache@v2 |
| 20 | + env: |
| 21 | + cache-name: cache-node-modules |
| 22 | + with: |
| 23 | + path: node_modules |
| 24 | + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('package.json') }}-${{ hashFiles('npm-shrinkwrap.json') }} |
| 25 | + restore-keys: | |
| 26 | + ${{ runner.os }}-build-${{ env.cache-name }}- |
| 27 | + ${{ runner.os }}-build- |
| 28 | + ${{ runner.os }}- |
| 29 | +
|
| 30 | + - name: Install Dependencies |
| 31 | + run: npm install |
| 32 | + |
| 33 | + - name: "[sm.act] Set env" |
| 34 | + uses: sourcemint/sm.act.github.actions/.github/actions/[email protected] |
| 35 | + |
| 36 | + - name: "[sm.act] Show env" |
| 37 | + uses: sourcemint/sm.act.github.actions/.github/actions/[email protected] |
| 38 | + |
| 39 | + - name: Build |
| 40 | + run: npm run build |
| 41 | + |
| 42 | + - name: Upload firefox extension as build artifact |
| 43 | + uses: actions/upload-artifact@v1 |
| 44 | + with: |
| 45 | + name: ${{ env.FIREPHP_BUILD_FILENAME_PREFIX }}-firefox.zip |
| 46 | + path: dist/${{ env.FIREPHP_BUILD_FILENAME_PREFIX }}-firefox.zip |
| 47 | + |
| 48 | + - name: Upload chrome extension as build artifact |
| 49 | + uses: actions/upload-artifact@v1 |
| 50 | + with: |
| 51 | + name: ${{ env.FIREPHP_BUILD_FILENAME_PREFIX }}-chrome.zip |
| 52 | + path: dist/${{ env.FIREPHP_BUILD_FILENAME_PREFIX }}-chrome.zip |
| 53 | + |
| 54 | + - name: Upload firefox release if tagging |
| 55 | + uses: fnkr/github-action-ghr@v1 |
| 56 | + if: startsWith(github.ref, 'refs/tags/') |
| 57 | + env: |
| 58 | + GHR_PATH: dist/${{ env.FIREPHP_BUILD_FILENAME_PREFIX }}-firefox.zip |
| 59 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 60 | + |
| 61 | + - name: Upload chrome release if tagging |
| 62 | + uses: fnkr/github-action-ghr@v1 |
| 63 | + if: startsWith(github.ref, 'refs/tags/') |
| 64 | + env: |
| 65 | + GHR_PATH: dist/${{ env.FIREPHP_BUILD_FILENAME_PREFIX }}-chrome.zip |
| 66 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 67 | + |
| 68 | + - name: "[sm.act] Write snapshot report" |
| 69 | + id: snapshot |
| 70 | + uses: sourcemint/sm.act.github.actions/.github/actions/[email protected] |
0 commit comments