mirror of
https://github.com/XFox111/PasswordGeneratorExtension.git
synced 2026-04-22 08:08:01 +03:00
Major 3.0: Complete overhaul of the codebase, new features, bugfixes and more (#223)
Complete overhaul for v3.0 (see related PR)
This commit is contained in:
@@ -10,72 +10,42 @@ on:
|
||||
- '**/cd_pipeline.yaml'
|
||||
- '**/dependabot.yml'
|
||||
- '**/codeql-analysis.yml'
|
||||
- '.vscode/*'
|
||||
- '.devcontainer/*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
targets:
|
||||
description: Targets
|
||||
required: true
|
||||
default: "chrome,firefox"
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container: node:20
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: ${{ fromJSON(format('[%s]', github.event.inputs.targets || 'chrome,firefox')) }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@main
|
||||
|
||||
- name: Configure manifest
|
||||
uses: Amadevus/pwsh-script@v2
|
||||
with:
|
||||
script: |
|
||||
[PSCustomObject] $package = Get-Content "package.json" | ConvertFrom-Json;
|
||||
[PSCustomObject] $manifest = Get-Content "public/manifest.json" | ConvertFrom-Json;
|
||||
$manifest.version = $package.version;
|
||||
$manifest | ConvertTo-Json -Depth 10 | Out-File "public/manifest.json"
|
||||
$manifest = Get-Content "public/manifest.v2.json" | ConvertFrom-Json;
|
||||
$manifest.version = $package.version;
|
||||
$manifest | ConvertTo-Json -Depth 10 | Out-File "public/manifest.v2.json"
|
||||
- run: yarn install
|
||||
- run: yarn lint
|
||||
- run: TARGET=${{ matrix.target }} yarn build
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16.x'
|
||||
cache: yarn
|
||||
- name: Drop artifacts (${{ matrix.target }})
|
||||
uses: actions/upload-artifact@main
|
||||
with:
|
||||
name: ${{ matrix.target }}
|
||||
path: dist
|
||||
|
||||
- run: yarn install
|
||||
- run: yarn build
|
||||
|
||||
- name: Drop artifacts (build)
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: build
|
||||
path: build
|
||||
|
||||
firefox-check:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: build
|
||||
|
||||
- name: Configure manifest
|
||||
uses: Amadevus/pwsh-script@v2
|
||||
with:
|
||||
script: |
|
||||
Remove-Item "manifest.json"
|
||||
Rename-Item "manifest.v2.json" "manifest.json"
|
||||
|
||||
- name: "web-ext lint"
|
||||
uses: kewisch/action-web-ext@e0ea88d527a8a90bc10d600f80ac667d219e6bf1
|
||||
with:
|
||||
cmd: lint
|
||||
source: .
|
||||
channel: listed
|
||||
|
||||
- name: Pack extension
|
||||
uses: TheDoctor0/zip-release@0.7.1
|
||||
with:
|
||||
filename: PasswordGenerator-Firefox.zip
|
||||
|
||||
- name: Drop artifacts (Firefox)
|
||||
uses: actions/upload-artifact@v3.1.2
|
||||
with:
|
||||
name: Firefox
|
||||
path: PasswordGenerator-Firefox.zip
|
||||
- name: "web-ext lint"
|
||||
if: ${{ matrix.target == 'firefox' }}
|
||||
uses: kewisch/action-web-ext@cb8a69420fea686e331e270b6581d4d289ecb2d2
|
||||
with:
|
||||
cmd: lint
|
||||
source: dist
|
||||
channel: listed
|
||||
|
||||
Reference in New Issue
Block a user