Add various improvements (#19)

* Add white stroke to icon

* Add lint workflow

* Add build workflow

* Add support for firefox android
This commit is contained in:
Dave Gallant
2024-01-14 16:31:12 -05:00
committed by GitHub
parent 15d3f2e8c2
commit 40d8be84b3
4 changed files with 66 additions and 2 deletions

39
.github/workflows/build.yaml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: "Build"
on:
push:
branches:
- main
pull_request:
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: Install jq
run: sudo apt-get install jq
- name: Get extension version
id: vars
run: |
version=$(jq -r .version manifest.json)
echo "version=$version" >> $GITHUB_OUTPUT
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: "web-ext build"
id: web-ext-build
uses: kewisch/action-web-ext@v1
with:
cmd: build
source: .
filename: "rfd-redirect-stripper-${{steps.vars.outputs.version}}-${{steps.vars.outputs.sha_short}}.xpi"
ignoreFiles: '[ "package.json","package-lock.json","yarn.lock" ]'
- name: "Upload Artifact"
uses: actions/upload-artifact@v4
with:
name: "rfd-redirect-stripper-${{steps.vars.outputs.version}}-${{steps.vars.outputs.sha_short}}.xpi"
path: ${{ steps.web-ext-build.outputs.target }}

22
.github/workflows/lint.yaml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: "Lint"
on:
push:
branches:
- main
pull_request:
jobs:
lint:
name: "Lint"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
cache: 'npm'
cache-dependency-path: package-lock.json
- run: npm ci
- run: npm run lint