Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
pull_request:
push:
branches:
- 'main'

jobs:
build:
name: Create Artifacts
runs-on: ubuntu-latest

steps:
#Initialization
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- run: npm ci

# Create Chrome artifacts
- name: Create Chrome artifacts
run: npm run build:ci:chrome
- uses: actions/upload-artifact@v4
with:
name: ChromeExtension
path: dist/chrome

# Create Firefox artifacts
- name: Create Firefox artifacts
run: npm run build:ci:firefox
- uses: actions/upload-artifact@v4
with:
name: FirefoxExtension
path: dist/firefox

# Create Edge artifacts
- name: Create Edge artifacts
run: npm run build:ci:edge
- uses: actions/upload-artifact@v4
with:
name: EdgeExtension
path: dist/edge

# Create Source artifacts
- name: Create Source artifacts
# Until actions/upload-artifact issue #426 merged
run: npm run build:ci:source && unzip dist/linkedzen-source -d dist/linkedzen-source/
- uses: actions/upload-artifact@v4
with:
name: ExtensionSource
path: dist/linkedzen-source
109 changes: 109 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Upload Release Build

on:
release:
types: [published]

jobs:
setup:
name: Setup
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: Create directory
run: cd ..; mkdir ./builds

zip-source:
name: Zip Source
runs-on: ubuntu-latest
needs: setup
steps:
- name: Zip Source code
run: zip -r ../builds/Source.zip *

build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: npm ci
- name: Create build directory
run: mkdir ./builds
- name: Build for Firefox
run: npm run build:ci:firefox
- name: Build for Chrome
run: npm run build:ci:chrome
- name: Build for Edge
run: npm run build:ci:edge

release:
name: Publish Release
runs-on: ubuntu-latest
needs: build
continue-on-error: true
steps:
# Upload Source artifacts
- name: Upload Source to release
uses: Shopify/upload-to-release@07611424e04f1475ddf550e1c0dd650b867d5467
with:
args: ../builds/Source.zip
name: Source.zip
path: ../builds/Source.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}

# Sign & Upload Firefox artifacts
- name: Sign and Publish artifact
env:
FIREFOX_ISSUER: ${{ secrets.FIREFOX_ISSUER }}
FIREFOX_SECRET: ${{ secrets.FIREFOX_SECRET }}
run: npx web-ext sign --channel listed -s ./dist/firefox/ --upload-source-code ../builds/Source.zip --artifacts-dir ./dist/firefox --api-key $FIREFOX_ISSUER --api-secret $FIREFOX_SECRET
- name: Move artifact
run: mv ./dist/firefox/linkedzen-*.xpi ./builds/FirefoxExtension.xpi
- name: Upload FirefoxExtension to release
uses: Shopify/upload-to-release@07611424e04f1475ddf550e1c0dd650b867d5467
with:
args: builds/FirefoxExtension.xpi
name: FirefoxExtension.xpi
path: ./builds/FirefoxExtension.xpi
repo-token: ${{ secrets.GITHUB_TOKEN }}

# Upload Chrome artifacts
- name: Zip Artifacts
run: cd ./dist/chrome ; zip -r ../builds/ChromeExtension.zip *
- name: Upload ChromeExtension to release
uses: Shopify/upload-to-release@07611424e04f1475ddf550e1c0dd650b867d5467
with:
args: builds/ChromeExtension.zip
name: ChromeExtension.zip
path: ./builds/ChromeExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Chrome Web Store
uses: wdzeng/chrome-extension@v1
with:
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
zip-path: './builds/ChromeExtension.zip'
extension-id: 'dnikkfpiokknefbehlodocadfgkmgdem'

# Upload Edge artifacts
- name: Zip Artifacts
run: cd ./dist/edge ; zip -r ../builds/EdgeExtension.zip *
- name: Upload EdgeExtension to release
uses: Shopify/upload-to-release@07611424e04f1475ddf550e1c0dd650b867d5467
with:
args: builds/EdgeExtension.zip
name: EdgeExtension.zip
path: ./builds/EdgeExtension.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Edge Addon Store
uses: wdzeng/edge-addon@v2
with:
product-id: 1324a294-9b30-4908-ae5d-7fed25018381
zip-path: ./builds/EdgeExtension.zip
api-key: ${{ secrets.EDGE_API_KEY }}
client-id: ${{ secrets.EDGE_CLIENT_ID }}
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "LinkedZen",
"description": "LinkedZen declutters LinkedIn by hiding the feed, sponsored content, and notifications. Focus on connections without distractions.",
"manifest_version": 3,
"version": "0.0.3",
"version": "0.0.7",
"icons": {
"16": "assets/logo-16.png",
"48": "assets/logo-48.png",
Expand Down
Loading
Loading