uBO Lite beta #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- 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 }} | |
name: ${{ env.TAGNAME }} | |
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 }} | |
files: ${{ env.UBLOCK_REPO_DIR }}/dist/build/uBOLite.beta.chromium.zip |