uBO Lite release #8
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 | |
# Chromium | |
- name: Build Chromium uBOLite MV3 packages | |
run: | | |
cd $UBLOCK_REPO_DIR | |
tools/make-mv3.sh chromium full | |
echo "TAGNAME=$(basename $(ls dist/build/uBOLite_*.chromium.mv3.zip) .chromium.mv3.zip)" >> $GITHUB_ENV | |
echo "CHROMIUM_PACKAGE=$(basename $(ls dist/build/uBOLite_*.chromium.mv3.zip))" >> $GITHUB_ENV | |
cd - > /dev/null | |
RELEASENAME=${TAGNAME/_/ } | |
echo "RELEASENAME=$RELEASENAME" >> $GITHUB_ENV | |
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 full | |
echo "FIREFOX_PACKAGE=$(basename $(ls dist/build/uBOLite_*.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/ | |
- 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: "[auto] 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 }}) | |
--- | |
## 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/) | |
The extension will auto-update when a new version is published. | |
#### Manual installation: | |
- Chromium: Download the [${{ env.TAGNAME }}.chromium.mv3.zip](https://github.com/uBlockOrigin/uBOL-home/releases/download/${{ env.TAGNAME }}/${{ env.TAGNAME }}.chromium.mv3.xpi) 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) | |
- 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 }} |