|
|
|
name: CI
|
|
|
|
|
|
|
|
on: push
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
steps:
|
|
|
|
- name: Clone repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
persist-credentials: 'false'
|
|
|
|
- name: Setup Node.js
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version-file: '.nvmrc'
|
|
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm install --legacy-peer-deps
|
|
|
|
- name: Build artifacts
|
|
|
|
run: |
|
|
|
|
npm run build:prod:zip:chrome
|
|
|
|
npm run build:prod:zip:edge
|
|
|
|
npm run build:prod:zip:firefox
|
|
|
|
npm run build:prod:zip:opera
|
|
|
|
env:
|
|
|
|
BUSTER_SECRETS: ${{ secrets.BUSTER_SECRETS }}
|
|
|
|
- name: Hash artifacts
|
|
|
|
run: sha256sum artifacts/*/*
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
with:
|
|
|
|
name: artifacts
|
|
|
|
path: artifacts/
|
|
|
|
retention-days: 1
|
|
|
|
release:
|
|
|
|
name: Release on GitHub
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
needs: [build]
|
|
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
steps:
|
|
|
|
- name: Download artifacts
|
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: artifacts
|
|
|
|
path: artifacts/
|
|
|
|
- name: Hash artifacts
|
|
|
|
run: sha256sum artifacts/*/*
|
|
|
|
- name: Create GitHub release
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref_name }}
|
|
|
|
name: ${{ github.ref_name }}
|
|
|
|
body: |
|
|
|
|
Download and install the extension from the [extension store](https://github.com/dessant/buster#readme) of your browser.
|
|
|
|
|
|
|
|
Learn more about this release from the [changelog](https://github.com/dessant/buster/blob/master/CHANGELOG.md#changelog).
|
|
|
|
files: artifacts/*/*
|
|
|
|
fail_on_unmatched_files: true
|
|
|
|
draft: true
|