2020-12-08 10:37:09 -07:00
|
|
|
name: GitHub CI
|
2020-12-08 10:05:02 -07:00
|
|
|
|
|
|
|
on:
|
|
|
|
create:
|
2020-12-08 10:37:09 -07:00
|
|
|
branches: master
|
2020-12-08 10:05:02 -07:00
|
|
|
|
2020-12-08 10:37:09 -07:00
|
|
|
# I used as template to get started:
|
|
|
|
# https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/.github/workflows/releases.yml
|
2020-12-09 08:35:02 -07:00
|
|
|
# https://github.com/dessant/search-by-image/blob/master/.github/workflows/ci.yml
|
2020-12-08 10:37:09 -07:00
|
|
|
|
2020-12-08 10:05:02 -07:00
|
|
|
jobs:
|
|
|
|
build:
|
2020-12-08 10:37:09 -07:00
|
|
|
name: Build packages
|
2020-12-08 10:05:02 -07:00
|
|
|
runs-on: ubuntu-latest
|
2020-12-09 08:35:02 -07:00
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
2020-12-08 10:05:02 -07:00
|
|
|
steps:
|
2020-12-09 08:35:02 -07:00
|
|
|
- name: Clone repository
|
|
|
|
uses: actions/checkout@v2
|
2020-12-09 08:47:10 -07:00
|
|
|
- name: Clone uAssets
|
2020-12-09 08:51:34 -07:00
|
|
|
run: |
|
2020-12-09 08:48:30 -07:00
|
|
|
pushd ..
|
|
|
|
git clone --depth 1 https://github.com/uBlockOrigin/uAssets.git
|
|
|
|
popd
|
2020-12-09 09:03:12 -07:00
|
|
|
- name: Set version
|
|
|
|
run: |
|
|
|
|
echo "VERSION=${{ format(github.ref, 'refs/tags/', '') }}" >> $GITHUB_ENV
|
2020-12-09 08:35:02 -07:00
|
|
|
- name: Build all packages
|
2020-12-08 10:05:02 -07:00
|
|
|
run: |
|
2020-12-09 08:35:02 -07:00
|
|
|
tools/make-chromium.sh $VERSION
|
|
|
|
tools/make-firefox.sh $VERSION
|
|
|
|
tools/make-thunderbird.sh $VERSION
|
2020-12-08 10:37:09 -07:00
|
|
|
- name: Upload packages
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
files: |
|
2020-12-09 08:35:02 -07:00
|
|
|
dist/build/uBlock0_$VERSION.chromium.zip
|
|
|
|
dist/build/uBlock0_$VERSION.firefox.xpi
|
|
|
|
dist/build/uBlock0_$VERSION.thunderbird.xpi
|