Skip to content

uBO Lite beta

uBO Lite beta #12

Workflow file for this run

name: uBO Lite beta
on: workflow_dispatch
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for creating release
name: Build packages
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
persist-credentials: false
# Set uBO version to use
- name: uBO version to use
run: |
UBO_VERSION_URL=$(cat ubo-version)
UBO_VERSION=${UBO_VERSION_URL: -40}
echo "UBO_VERSION=$UBO_VERSION" >> $GITHUB_ENV
# https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
- name: Clone uBO repo
run: |
UBLOCK_REPO_DIR=$(mktemp -d)
echo "UBLOCK_REPO_DIR=$UBLOCK_REPO_DIR" >> $GITHUB_ENV
git clone --depth 1 https://github.com/gorhill/uBlock.git $UBLOCK_REPO_DIR
# Version, time-based
- name: Create unique time-based version
run: |
TAGNAME=uBOLite_$(date -u "+%Y.%-m.%-d.")$(date -u "+%H*60+%M" | bc)
echo "TAGNAME=$TAGNAME" >> $GITHUB_ENV
echo "Version: $TAGNAME"
# Chromium
- name: Build Chromium uBOLite beta
run: |
UBOL_REPO_DIR=$(pwd)
cd $UBLOCK_REPO_DIR
tools/make-mv3.sh chromium ${{ env.TAGNAME }} before=$UBOL_REPO_DIR
cd - > /dev/null
mv ${{ env.UBLOCK_REPO_DIR }}/dist/build/${{ env.TAGNAME }}.chromium.mv3.zip \
${{ env.UBLOCK_REPO_DIR }}/dist/build/uBOLite.beta.chromium.zip
# Firefox
- name: Build Firefox uBOLite MV3 packages
run: |
UBOL_REPO_DIR=$(pwd)
cd $UBLOCK_REPO_DIR
tools/make-mv3.sh firefox ${{ env.TAGNAME }} before=$UBOL_REPO_DIR
cd - > /dev/null
mv ${{ env.UBLOCK_REPO_DIR }}/dist/build/${{ env.TAGNAME }}.firefox.mv3.xpi \
${{ env.UBLOCK_REPO_DIR }}/dist/build/uBOLite.beta.firefox.xpi
- name: Create GitHub beta release
id: create_beta_release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAGNAME }}-beta
name: ${{ env.TAGNAME }}-beta
prerelease: true
body: |
**uBO Lite** (uBOL), a **permission-less** [MV3 API-based](https://developer.chrome.com/docs/extensions/mv3/intro/) content blocker.
- [Synopsis](https://github.com/uBlockOrigin/uBOL-issues#readme)
- [Documentation](https://github.com/uBlockOrigin/uBOL-home/wiki)
**This is a beta version.**
Based on <https://github.com/gorhill/uBlock/tree/${{ env.UBO_VERSION }}>
- name: Upload Chromium uBOLite beta
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.TAGNAME }}-beta
files: |
${{ env.UBLOCK_REPO_DIR }}/dist/build/uBOLite.beta.chromium.zip
${{ env.UBLOCK_REPO_DIR }}/dist/build/uBOLite.beta.firefox.xpi