Skip to content

Commit

Permalink
add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
semanticdata committed May 8, 2024
1 parent f71e475 commit aca4376
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
name: Release new version
name: Release new version (example)

on:
# push:
# tags:
# - "v*.*.*"
# release:
# types: [published]
# on:
# push:
# tags:
# - "v*.*.*"
# release:
# types: [published]

jobs:
build-release:
name: Build and Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build
id: web-ext-build
uses: kewisch/action-web-ext@v1
with:
cmd: build
filename: "{name}-{version}.xpi"
filename: '{name}-{version}.xpi'
ignoreFiles: '[ "package.json", "package-lock.json", "yarn.lock", ".github", ".gitattributes", "LICENSE", "README.md"]'

- name: Sign
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/web-ext-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build (web-ext)

# on:
# push:
# tags:
# - "v*.*.*"
# release:
# types: [published]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build web-ext
id: web-ext-build
uses: kewisch/action-web-ext@v1
with:
cmd: build
source: src
filename: '{name}-{version}.xpi'
ignoreFiles: '[ "package.json","package-lock.json","yarn.lock" ]'

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: target.xpi
path: ${{ steps.web-ext-build.outputs.target }}
23 changes: 23 additions & 0 deletions .github/workflows/web-ext-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint (web-ext)

# on:
# push:
# tags:
# - "v*.*.*"
# release:
# types: [published]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Lint web-ext
uses: kewisch/action-web-ext@v1
with:
cmd: lint
source: src
channel: listed
41 changes: 41 additions & 0 deletions .github/workflows/web-ext-sign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Sign (web-ext)

# on:
# push:
# tags:
# - "v*.*.*"
# release:
# types: [published]

jobs:
sign:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build web-ext
id: web-ext-build
uses: kewisch/action-web-ext@v1
with:
cmd: build
source: src

- name: Sign web-ext
id: web-ext-sign
uses: kewisch/action-web-ext@v1
with:
cmd: sign
source: ${{ steps.web-ext-build.outputs.target }}
channel: listed
apiKey: ${{ secrets.FIREFOX_JWT_ISSUER }}
apiSecret: ${{ secrets.FIREFOX_JWT_SECRET }}
timeout: 900000

- name: Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ steps.web-ext-sign.outputs.target }}
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Monorepo of my browser extensions.

- [Browser Extensions](#browser-extensions)
- [Table of Contents](#table-of-contents)
- [Repository Secrets](#repository-secrets)
- [Previous Repositories](#previous-repositories)
- [🦊 Brave Search](#-brave-search)
- [🟩 ChatGPT in Sidebar](#-chatgpt-in-sidebar)
Expand All @@ -27,6 +28,13 @@ Monorepo of my browser extensions.
- [🟢 WhatsApp Pinned](#-whatsapp-pinned)
- [© License](#-license)

## Repository Secrets

Required for signing extensions prior releasing a new version. These can be found here: [Manage API Keys](https://addons.mozilla.org/en-US/developers/addon/api/key/).

- JWT Issuer: `FIREFOX_JWT_ISSUER`
- JWT Secret: `FIREFOX_JWT_SECRET`

## Previous Repositories

- [Brave Search](https://github.com/semanticdata/firefox-brave-search)
Expand Down

0 comments on commit aca4376

Please sign in to comment.