From 42a9f99489770b17636d44e363147c713d3eefbd Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 8 Dec 2020 12:05:02 -0500 Subject: [PATCH 1/2] Create main.yml This probably won't work... --- .github/workflows/main.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..1ed2d3035 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,32 @@ +# This is a basic workflow to help you get started with Actions + +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 + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + 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 + run: | + ./tools/make-chromium.sh $GITHUB_REF + ./tools/make-firefox.sh $GITHUB_REF + ./tools/make-thunderbird.sh $GITHUB_REF From 958c1cf9ea0c23a32256249912a2f729ce9a206c Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 8 Dec 2020 12:37:09 -0500 Subject: [PATCH 2/2] Update main.yml --- .github/workflows/main.yml | 44 +++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) 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