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 - name: Install Zip run: sudo apt-get install zip # 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 - name: Zip Artifacts run: cd ./dist - run: zip -r ../builds/ChromeExtension.zip * - run: cd ../ # Create Firefox artifacts - name: Create Firefox artifacts run: npm run build:firefox - uses: actions/upload-artifact@v1 with: name: FirefoxExtension path: dist - name: Zip Artifacts run: cd ./dist - uses: montudor/action-zip@v0.1.0 with: args: zip -r ../builds/FirefoxExtension.zip * - run: cd ../ # 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 - name: Zip Artifacts run: cd ./dist - run: zip -r ../builds/ChromeExtensionBeta.zip * - run: cd ../ - name: Create Firefox Beta artifacts run: npm run build:firefox -- --env.stream=beta - uses: actions/upload-artifact@v1 with: name: FirefoxExtensionBeta path: dist - name: Zip Artifacts run: cd ./dist - run: zip -r ../builds/FirefoxExtensionBeta.zip * - run: cd ../ # Create Firefox Signed Beta version - name: Create Firefox Signed Beta artifacts run: npm run web-sign env: WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }} WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }} - name: Install rename run: sudo apt-get install rename - name: Install signed file run: cd ./web-ext-artifacts - run: rename 's/.*/FirefoxSignedInstaller.xpi/' * - run: cd .. - uses: actions/upload-artifact@v1 with: name: FirefoxExtensionSigned.xpi path: ./web-ext-artifacts/FirefoxSignedInstaller.xpi # Upload each release asset - name: Upload to release uses: Shopify/upload-to-release@master with: args: builds/ChromeExtension.zip name: ChromeExtension.zip path: ./builds/ChromeExtension.zip repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Upload to release uses: Shopify/upload-to-release@master with: args: builds/ChromeExtensionBeta.zip name: ChromeExtensionBeta.zip path: ./builds/ChromeExtensionBeta.zip repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Upload to release uses: Shopify/upload-to-release@master with: args: builds/FirefoxExtension.zip name: FirefoxExtension.zip path: ./builds/FirefoxExtension.zip repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Upload to release uses: Shopify/upload-to-release@master with: args: web-ext-artifacts/FirefoxSignedInstaller.xpi name: FirefoxSignedInstaller.xpi path: ./web-ext-artifacts/FirefoxSignedInstaller.xpi repo-token: ${{ secrets.GITHUB_TOKEN }}