uBO Lite release #37
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 release | |
on: workflow_dispatch | |
permissions: | |
contents: read | |
# I used the following project as template to get started: | |
# https://github.com/dessant/search-by-image/blob/master/.github/workflows/ci.yml | |
jobs: | |
build: | |
permissions: | |
contents: write # for creating release | |
name: Build packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
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 MV3 packages | |
run: | | |
cd $UBLOCK_REPO_DIR | |
tools/make-mv3.sh chromium ${{ env.TAGNAME }} before=$(pwd) | |
echo "CHROMIUM_PACKAGE=${{ env.TAGNAME }}.chromium.mv3.zip" >> $GITHUB_ENV | |
cd - > /dev/null | |
rm -rf chromium | |
mv "$UBLOCK_REPO_DIR/dist/build/uBOLite.chromium" chromium | |
cp "$UBLOCK_REPO_DIR/dist/build/mv3-data/log.txt" chromium/ | |
# Firefox | |
- name: Build Firefox uBOLite MV3 packages | |
run: | | |
cd $UBLOCK_REPO_DIR | |
tools/make-mv3.sh firefox ${{ env.TAGNAME }} before=$(pwd) | |
echo "FIREFOX_PACKAGE=${{ env.TAGNAME }}.firefox.mv3.xpi" >> $GITHUB_ENV | |
cd - > /dev/null | |
rm -rf firefox | |
mv "$UBLOCK_REPO_DIR/dist/build/uBOLite.firefox" firefox | |
cp "$UBLOCK_REPO_DIR/dist/build/mv3-data/log.txt" firefox/ | |
# Edge | |
- name: Build Edge uBOLite MV3 packages | |
run: | | |
make edge | |
pushd build/uBOLite.edge/ > /dev/null | |
zip ../${{ env.TAGNAME }}.edge.mv3.zip -qr ./* | |
popd > /dev/null | |
echo "EDGE_PACKAGE=${{ env.TAGNAME }}.edge.mv3.zip" >> $GITHUB_ENV | |
- name: Commit uBOLite MV3 package files | |
# https://github.com/marketplace/actions/github-action-for-committing-changes-to-a-repository | |
uses: devops-infra/action-commit-push@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
commit_message: "[workflow] Update uBOLite MV3 package files for ${{ env.TAGNAME }}" | |
- name: Create GitHub release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ 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) | |
## Release notes | |
- Updated filter lists | |
- [Commit history](https://github.com/uBlockOrigin/uBOL-home/commits/${{ env.TAGNAME }}) | |
- Based on <https://github.com/gorhill/uBlock/tree/${{ env.UBO_VERSION }}> | |
--- | |
## Installation | |
- Chromium-based browsers: Install [from the Chrome Web Store](https://chrome.google.com/webstore/detail/ddkjiahejlhfcafbddmgiahcphecmpfh) | |
- Firefox: [Install from AMO](https://addons.mozilla.org/firefox/addon/ublock-origin-lite/) | |
- Microsoft Edge: Install [from the Egde Add-ons store](https://microsoftedge.microsoft.com/addons/detail/ublock-origin-lite/cimighlppcgcoapaliogpjjdehbnofhn) | |
The extension will auto-update when a new version is published. | |
<details><summary>Manual installation</summary> | |
- Chromium: Download the [${{ env.TAGNAME }}.chromium.mv3.zip](https://github.com/uBlockOrigin/uBOL-home/releases/download/${{ env.TAGNAME }}/${{ env.TAGNAME }}.chromium.mv3.zip) package below, unzip, navigate to `chrome://extensions/` in your browser, then [tell the browser to load the extension](https://stackoverflow.com/questions/24577024/install-chrome-extension-form-outside-the-chrome-web-store/24577660#24577660). You will have to update the extension manually. | |
- Firefox: Click [${{ env.TAGNAME }}.firefox.signed.mv3.xpi](https://github.com/uBlockOrigin/uBOL-home/releases/download/${{ env.TAGNAME }}/${{ env.TAGNAME }}.firefox.signed.mv3.xpi) | |
</details> | |
- name: Upload Chromium uBOLite MV3 package | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.TAGNAME }} | |
files: ${{ env.UBLOCK_REPO_DIR }}/dist/build/${{ env.CHROMIUM_PACKAGE }} | |
- name: Upload Firefox uBOLite MV3 package | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.TAGNAME }} | |
files: ${{ env.UBLOCK_REPO_DIR }}/dist/build/${{ env.FIREFOX_PACKAGE }} | |
- name: Upload Edge uBOLite MV3 package | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.TAGNAME }} | |
files: build/${{ env.EDGE_PACKAGE }} |