diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1ed2d3035..bac4a97ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,32 +1,32 @@ -# This is a basic workflow to help you get started with Actions +name: GitHub CI -name: CI - -# Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the master branch create: - branches: - - 'master' - - # Allows you to run this workflow manually from the Actions tab + branches: master workflow_dispatch: -# A workflow run is made up of one or more jobs that can run sequentially or in parallel +# I used as template to get started: +# https://github.com/DNSCrypt/dnscrypt-proxy/blob/master/.github/workflows/releases.yml + jobs: - # This workflow contains a single job called "build" build: - # The type of runner that the job will run on + name: Build packages runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - # Runs a set of commands using the runners shell - - name: Create packages + - name: Build all + if: startsWith(github.ref, 'refs/tags/') run: | - ./tools/make-chromium.sh $GITHUB_REF - ./tools/make-firefox.sh $GITHUB_REF - ./tools/make-thunderbird.sh $GITHUB_REF + ./tools/make-chromium.sh ${{ github.ref }} + ./tools/make-firefox.sh ${{ github.ref }} + ./tools/make-thunderbird.sh ${{ github.ref }} + + - name: Upload packages + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + files: | + uBlock/dist/build/uBlock0_${{ github.ref }}.chromium.zip + uBlock/dist/build/uBlock0_${{ github.ref }}.firefox.xpi + uBlock/dist/build/uBlock0_${{ github.ref }}.thunderbird.xpi