2020-12-08 18:37:09 +01:00
|
|
|
name: GitHub CI
|
2020-12-08 18:05:02 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
create:
|
2020-12-08 18:37:09 +01:00
|
|
|
branches: master
|
2020-12-08 18:05:02 +01:00
|
|
|
|
2020-12-08 18:37:09 +01:00
|
|
|
# I used as template to get started:
|
|
|
|
# https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/.github/workflows/releases.yml
|
2020-12-09 16:35:02 +01:00
|
|
|
# https://github.com/dessant/search-by-image/blob/master/.github/workflows/ci.yml
|
2020-12-08 18:37:09 +01:00
|
|
|
|
2020-12-08 18:05:02 +01:00
|
|
|
jobs:
|
|
|
|
build:
|
2020-12-08 18:37:09 +01:00
|
|
|
name: Build packages
|
2020-12-08 18:05:02 +01:00
|
|
|
runs-on: ubuntu-latest
|
2020-12-09 16:35:02 +01:00
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
2020-12-08 18:05:02 +01:00
|
|
|
steps:
|
2020-12-09 16:35:02 +01:00
|
|
|
- name: Clone repository
|
|
|
|
uses: actions/checkout@v2
|
2020-12-09 16:47:10 +01:00
|
|
|
- name: Clone uAssets
|
2020-12-09 16:51:34 +01:00
|
|
|
run: |
|
2020-12-09 16:48:30 +01:00
|
|
|
pushd ..
|
|
|
|
git clone --depth 1 https://github.com/uBlockOrigin/uAssets.git
|
|
|
|
popd
|
2020-12-09 17:03:12 +01:00
|
|
|
- name: Set version
|
|
|
|
run: |
|
2020-12-09 17:09:14 +01:00
|
|
|
echo "VERSION=$(basename -- ${{ github.ref }})" >> $GITHUB_ENV
|
2020-12-09 16:35:02 +01:00
|
|
|
- name: Build all packages
|
2020-12-08 18:05:02 +01:00
|
|
|
run: |
|
2020-12-09 16:35:02 +01:00
|
|
|
tools/make-chromium.sh $VERSION
|
|
|
|
tools/make-firefox.sh $VERSION
|
|
|
|
tools/make-thunderbird.sh $VERSION
|
2020-12-09 17:32:56 +01:00
|
|
|
- name: Create GitHub release
|
2020-12-09 17:30:09 +01:00
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ steps.release_info.outputs.TAG }}
|
|
|
|
release_name: ${{ steps.release_info.outputs.TAG }}
|
|
|
|
draft: true
|
2020-12-09 17:23:14 +01:00
|
|
|
- name: Upload Chromium package
|
|
|
|
uses: actions/upload-release-asset@v1
|
2020-12-08 18:37:09 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
2020-12-09 17:23:14 +01:00
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
asset_path: dist/build/uBlock0_$VERSION.chromium.zip
|
|
|
|
asset_name: dist/build/uBlock0_$VERSION.chromium.zip
|
|
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: Upload Firefox package
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
asset_path: dist/build/uBlock0_$VERSION.firefox.zip
|
|
|
|
asset_name: dist/build/uBlock0_$VERSION.firefox.zip
|
|
|
|
asset_content_type: application/octet-stream
|
|
|
|
- name: Upload Thunderbird package
|
|
|
|
uses: actions/upload-release-asset@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
|
|
asset_path: dist/build/uBlock0_$VERSION.thunderbird.zip
|
|
|
|
asset_name: dist/build/uBlock0_$VERSION.thunderbird.zip
|
|
|
|
asset_content_type: application/octet-stream
|