1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-04 18:19:38 +02:00
uBlock/.github/workflows/main.yml
Workflow config file is invalid. Please check your config file: yaml: line 12: did not find expected key
2020-12-09 11:30:09 -05:00

68 lines
2.4 KiB
YAML

name: GitHub CI
on:
create:
branches: master
# I used as template to get started:
# https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/.github/workflows/releases.yml
# https://github.com/dessant/search-by-image/blob/master/.github/workflows/ci.yml
jobs:
build:
name: Build packages
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Clone uAssets
run: |
pushd ..
git clone --depth 1 https://github.com/uBlockOrigin/uAssets.git
popd
- name: Set version
run: |
echo "VERSION=$(basename -- ${{ github.ref }})" >> $GITHUB_ENV
- name: Build all packages
run: |
tools/make-chromium.sh $VERSION
tools/make-firefox.sh $VERSION
tools/make-thunderbird.sh $VERSION
- name: Create GitHub release
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
- name: Upload Chromium 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.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