aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/release.yml
blob: 21a2fe2a38216c0b1d55aed71dcfc8e2299f4573 (plain)
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
75
76
name: Upload Release Build

on: 
  release:
    types: [published]

jobs:

  build:
    name: Upload Release
    runs-on: ubuntu-latest

    steps:
      # Initialization
      - uses: actions/checkout@v1
      - uses: actions/setup-node@v1
      - run: npm install
      - name: Copy configuration
        run: cp config.json.example config.json

      # Create Chrome artifacts
      - name: Create Chrome artifacts
        run: npm run build:chrome
      - uses: actions/upload-artifact@v1
        with:
          name: ChromeExtension
          path: dist
      - run: mkdir ./builds
      - uses: montudor/action-zip@v0.1.0
        with:
          args: zip -qq -r ./builds/ChromeExtension.zip ./dist

      # Create Firefox artifacts
      - name: Create Firefox artifacts
        run: npm run build:firefox
      - uses: actions/upload-artifact@v1
        with:
          name: FirefoxExtension
          path: dist
      - uses: montudor/action-zip@v0.1.0
        with:
          args: zip -qq -r ./builds/FirefoxExtension.zip ./dist

      # Create Beta artifacts (Builds with the name changed to beta)
      - name: Create Chrome Beta artifacts
        run: npm run build:chrome -- --env.stream=beta
      - uses: actions/upload-artifact@v1
        with:
          name: ChromeExtensionBeta
          path: dist
      - uses: montudor/action-zip@v0.1.0
        with:
          args: zip -qq -r ./builds/ChromeExtensionBeta.zip ./dist

      - name: Create Firefox Beta artifacts
        run: npm run build:firefox -- --env.stream=beta
      - uses: actions/upload-artifact@v1
        with:
          name: FirefoxExtensionBeta
          path: dist
      - uses: montudor/action-zip@v0.1.0
        with:
          args: zip -qq -r ./builds/FirefoxExtensionBeta.zip ./dist

      # Upload each release asset
      - name: Upload to release
        uses: Shopify/upload-to-release@master
        with:
          args: builds/ChromeExtension.zip
          repo-token: ${{ secrets.GITHUB_TOKEN }}
      - name: Upload to release
        uses: Shopify/upload-to-release@master
        with:
          args: builds/FirefoxExtension.zip
          repo-token: ${{ secrets.GITHUB_TOKEN }}