1
0
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 … (#224)

* Major 3.0: Complete overhaul of the codebase, new features, bugfixes and more (#223)

Complete overhaul for v3.0 (see related PR)

* Fix for workflows matrix

* Reverted PR workflow to manual node setup

* Revert "Reverted PR workflow to manual node setup"

This reverts commit 491afd58ab.

* Replaced web-ext lint action

* Workflow fix

* Deprecated autocopy feature

* Zero-day patch: Batch 1 (#231)

* Bump @types/react-dom from 18.2.8 to 18.2.15 (#230)

Bumps [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) from 18.2.8 to 18.2.15.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom)

---
updated-dependencies:
- dependency-name: "@types/react-dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump typescript from 4.9.5 to 5.2.2 (#228)

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.5 to 5.2.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.9.5...v5.2.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @fluentui/react-icons from 2.0.218 to 2.0.222 (#227)

Bumps [@fluentui/react-icons](https://github.com/microsoft/fluentui-system-icons) from 2.0.218 to 2.0.222.
- [Commits](https://github.com/microsoft/fluentui-system-icons/commits)

---
updated-dependencies:
- dependency-name: "@fluentui/react-icons"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump dev-build-deploy/release-me from 0.14.0 to 0.15.0 (#225)

Bumps [dev-build-deploy/release-me](https://github.com/dev-build-deploy/release-me) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/dev-build-deploy/release-me/releases)
- [Changelog](https://github.com/dev-build-deploy/release-me/blob/main/docs/get-release.md)
- [Commits](https://github.com/dev-build-deploy/release-me/compare/v0.14.0...v0.15.0)

---
updated-dependencies:
- dependency-name: dev-build-deploy/release-me
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump sass from 1.69.0 to 1.69.5 (#229)

Bumps [sass](https://github.com/sass/dart-sass) from 1.69.0 to 1.69.5.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.69.0...1.69.5)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eugene Fox <eugene.xfox@outlook.com>

* Bump @types/webextension-polyfill from 0.10.4 to 0.10.6 (#226)

Bumps [@types/webextension-polyfill](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/webextension-polyfill) from 0.10.4 to 0.10.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/webextension-polyfill)

---
updated-dependencies:
- dependency-name: "@types/webextension-polyfill"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eugene Fox <eugene.xfox@outlook.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Zero-day patch: Batch 2 (#236)

* Bump @fluentui/react-components from 9.34.0 to 9.39.0 (#235)

Bumps [@fluentui/react-components](https://github.com/microsoft/fluentui) from 9.34.0 to 9.39.0.
- [Release notes](https://github.com/microsoft/fluentui/releases)
- [Changelog](https://github.com/microsoft/fluentui/blob/master/azure-pipelines.release-fluentui.yml)
- [Commits](https://github.com/microsoft/fluentui/compare/@fluentui/react-components_v9.34.0...@fluentui/react-components_v9.39.0)

---
updated-dependencies:
- dependency-name: "@fluentui/react-components"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @vitejs/plugin-react-swc from 3.4.0 to 3.4.1 (#234)

Bumps [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) from 3.4.0 to 3.4.1.
- [Release notes](https://github.com/vitejs/vite-plugin-react-swc/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react-swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react-swc/compare/v3.4.0...v3.4.1)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react-swc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @types/react from 18.2.24 to 18.2.37 (#233)

Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.24 to 18.2.37.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---
updated-dependencies:
- dependency-name: "@types/react"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump vite from 4.4.10 to 4.5.0 (#232)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.4.10 to 4.5.0.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.5.0/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
Eugene Fox
2023-11-12 19:49:35 +03:00
committed by GitHub
parent 3e137f6955
commit 7e7b6f71a4
79 changed files with 6563 additions and 10587 deletions
-34
View File
@@ -1,34 +0,0 @@
---
name: Bug report
about: Create a report to help us improve the extension
title: ''
labels: bug
assignees: xfox111
---
### Description
A clear and concise description of what the bug is.
### Reproduction steps
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
### Expected behavior
A clear and concise description of what you expected to happen.
### Screenshots
If applicable, add screenshots to help explain your problem.
### Environment
Please provide the following information:
- Operating System: [e.g. Windows 10 Pro 1909 (10.0.18363)]
- Browser: [e.g. Microsoft Edge 83.0.478.56]
- Extension version: [e.g. 1.5]
### Additional context
Add any other context about the problem here.
- [ ] Are you willing to submit a pull request to implement this feature yourself?
+112
View File
@@ -0,0 +1,112 @@
name: "🐞 Bug Report"
description: Create a report to help us improve the extension
title: "[Bug]: "
labels: ["bug", "needs-triage"]
assignees:
- xfox111
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: textarea
id: desc
attributes:
label: Description
description: A clear and concise description of what the bug is.
placeholder: e.g. Sometimes when generating a password not all character sets are included
render: Markdown
validations:
required: true
- type: textarea
attributes:
label: Reproduction steps
description: Precisely describe minimal number of steps that make the bug to appear
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See '...'
render: Markdown
validations:
required: true
- type: textarea
attributes:
label: Expected behavior
description: A clear and concise description of what you expected to happen.
placeholder: e.g. Generated password should include at least one character from every enabled character set
render: Markdown
validations:
required: true
- type: textarea
attributes:
label: Screenshot
description: If applicable, add screenshots to help explain your problem.
render: Markdown
validations:
required: false
- type: dropdown
id: os
attributes:
label: Operating system
options:
- "Windows 10+"
- "Windows 8/8.1"
- "Windows 7 and older"
- "MacOS"
- "Debian or Debian-based"
- "Other"
validations:
required: true
- type: input
id: browser
attributes:
label: Browser name and version
placeholder: e.g. Microsoft Edge 119.0.2151.58
description: Put here your browser's name and version
validations:
required: true
- type: input
id: version
attributes:
label: Extension version
placeholder: e.g. 3.0.0
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context about the problem here.
render: Markdown
validations:
required: false
- type: dropdown
id: requested-help
attributes:
label: Are you willing to submit a PR for this issue?
options:
- "yes"
- "no"
validations:
required: true
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
required: true
- label: The provided reproduction is a minimal reproducible example of the bug.
required: true
+5
View File
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Questions & Discussions
url: https://github.com/XFox111/PasswordGeneratorExtension/discussions
about: Use GitHub discussions for message-board style questions and discussions.
-21
View File
@@ -1,21 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: xfox111
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when '...'
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
- [ ] Are you willing to submit a pull request to implement this feature yourself?
@@ -0,0 +1,66 @@
name: "🚀 New feature proposal"
description: Suggest a feature idea for this project
title: "[Feature]: "
labels: ["feature", "needs-triage"]
assignees:
- xfox111
body:
- type: markdown
attributes:
value: |
Thanks for your interest in the project and taking the time to fill out this feature report!
- type: textarea
id: proposition
attributes:
label: Proposed solution
description: Describe the solution you'd like
render: Markdown
validations:
required: true
- type: textarea
id: justification
attributes:
label: Justification
description: Is your feature request related to a problem? Please describe.
render: Markdown
validations:
required: true
- type: textarea
id: alts
attributes:
label: Alternatives
description: Describe alternatives you've considered.
render: Markdown
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
render: Markdown
validations:
required: false
- type: dropdown
id: requested-help
attributes:
label: Are you willing to submit a PR for this issue?
options:
- "yes"
- "no"
validations:
required: true
- type: checkboxes
id: checkboxes
attributes:
label: Validations
description: Before submitting the issue, please make sure you do the following
options:
- label: Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
required: true
+5 -5
View File
@@ -16,14 +16,14 @@ From now on we are starting to roll out updates on every first Tuesday of the mo
Dependencies update and security fixes
## Changelog
### Dependencies bump
### Dependency bumps
- #
### Fixed security vulnerabilities
-
- [CWE-20](https://cwe.mitre.org/data/definitions/20.html) (#)
- CVE-2022-25883 (#)
## PR Checklist
- [ ] Update extension version in `package.json`
- [ ] Create a release draft
- [ ] [Post-merge] Create a release to publish the new version
- [ ] Update version in `package.json`
- [ ] [Post-merge] Review and publish GitHub release
- [ ] [Post-deploy] Update changelog for Firefox webstore
-->
+2 -2
View File
@@ -3,11 +3,11 @@
From now on we are starting to roll out updates on every first Tuesday of the month, which will include bugfixes, security and dependency updates to keep the project's security and stability up to date!
-->
## What's new
<!-- - Dependency updates and security patches -->
<!-- - Dependency updates and security patches (#) -->
<!-->### Fixed security issues in this update
- [CWE-20](https://cwe.mitre.org/data/definitions/20.html)
- CVE-2022-25883
-->
Refer to [Download section of README.md](https://github.com/XFox111/PasswordGeneratorExtension#download) for instructions and download links
Refer to [Download section of the README.md](https://github.com/XFox111/PasswordGeneratorExtension#download) for sideloading instructions and download links
+117 -161
View File
@@ -5,189 +5,145 @@ on:
types: [ released ]
workflow_dispatch:
inputs:
targets:
description: Targets
required: true
default: '["chrome","firefox"]'
type: choice
options:
- '["chrome","firefox"]'
- '["chrome"]'
- '["firefox"]'
firefox:
description: Mozilla Firefox
description: Deploy Firefox
type: boolean
default: true
chrome:
description: Google Chrome
description: Deploy Chrome
type: boolean
default: true
edge:
description: Microsoft Edge
description: Deploy Edge
type: boolean
default: true
gh-release:
description: Attach to GitHub release
type: boolean
default: true
jobs:
Build:
build:
runs-on: ubuntu-latest
container: node:20
strategy:
fail-fast: false
matrix:
target: ${{ fromJSON(github.event.inputs.targets || '["chrome","firefox"]') }}
steps:
- uses: actions/checkout@main
- run: yarn install
- run: yarn lint
- run: TARGET=${{ matrix.target }} yarn build
- name: Drop build artifacts (${{ matrix.target }})
uses: actions/upload-artifact@main
with:
name: ${{ matrix.target }}
path: dist
- name: web-ext lint
if: ${{ matrix.target == 'firefox' }}
uses: freaktechnik/web-ext-lint@main
with:
extension-root: dist
self-hosted: false
- uses: TheDoctor0/zip-release@main
with:
filename: packed-${{ matrix.target }}.zip
path: dist
- name: Drop packed artifacts (${{ matrix.target }})
uses: actions/upload-artifact@main
with:
name: packed-${{ matrix.target }}
path: packed-${{ matrix.target }}.zip
publish-github:
needs: build
if: ${{ github.event_name == 'release' || github.event.inputs.gh-release == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: ${{ fromJSON(github.event.inputs.targets || '["chrome","firefox"]') }}
steps:
- uses: actions/download-artifact@main
with:
name: packed-${{ matrix.target }}
- name: Attach build to release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: PasswordGenerator-${{ matrix.target }}.zip
draft: false
overwrite: true
update_latest_release: true
publish-chrome:
needs: build
if: ${{ github.event_name == 'release' || (github.event.inputs.chrome == 'true' && contains(github.event.inputs.targets, 'chrome')) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@main
with:
name: packed-chrome
- name: Configure manifest
uses: Amadevus/pwsh-script@v2
with:
script: |
[PSCustomObject] $package = Get-Content "package.json" | ConvertFrom-Json;
- uses: wdzeng/chrome-extension@main
with:
extension-id: jnjobgjobffgmgfnkpkjfjkkfhfikmfl
zip-path: packed-chrome.zip
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
[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"
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
cache: yarn
- run: yarn install
- run: yarn build
- name: Drop artifacts (build)
uses: actions/upload-artifact@v3.1.2
with:
name: build
path: build
Pack-Chromium:
if: ${{ github.event_name == 'release' || github.event.inputs.chrome == 'true' || github.event.inputs.edge == 'true' }}
needs: Build
publish-edge:
needs: build
if: ${{ github.event_name == 'release' || (github.event.inputs.edge == 'true' && contains(github.event.inputs.targets, 'chrome')) }}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: build
- uses: actions/download-artifact@main
with:
name: packed-chrome
- name: Configure manifest
uses: Amadevus/pwsh-script@v2
with:
script: Remove-Item "manifest.v2.json"
- uses: wdzeng/edge-addon@main
with:
product-id: ${{ secrets.EDGE_PRODUCT_ID }}
zip-path: packed-chrome.zip
client-id: ${{ secrets.EDGE_CLIENT_ID }}
client-secret: ${{ secrets.EDGE_CLIENT_SECRET }}
access-token-url: ${{ secrets.EDGE_ACCESS_TOKEN_URL }}
- name: Pack extension
uses: TheDoctor0/zip-release@0.7.1
with:
filename: PasswordGenerator-Chromium.zip
- name: Drop artifacts (Chromium)
uses: actions/upload-artifact@v3.1.2
with:
name: Chromium
path: PasswordGenerator-Chromium.zip
- name: Attach build to release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: PasswordGenerator-Chromium.zip
draft: false
update_latest_release: true
Pack-Firefox:
if: ${{ github.event_name == 'release' || github.event.inputs.firefox == 'true' }}
needs: Build
publish-firefox:
needs: build
if: ${{ github.event_name == 'release' || (github.event.inputs.firefox == 'true' && contains(github.event.inputs.targets, 'firefox')) }}
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: build
- uses: actions/download-artifact@main
with:
name: packed-firefox
- 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: Attach build to release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: PasswordGenerator-Firefox.zip
draft: false
update_latest_release: true
Chrome:
if: ${{ github.event_name == 'release' || github.event.inputs.chrome == 'true' }}
needs: Pack-Chromium
runs-on: ubuntu-latest
steps:
- name: Download artifacts (Chromium)
uses: actions/download-artifact@v3
with:
name: Chromium
- name: Publish to Chrome Web Store
uses: wdzeng/chrome-extension@v1.1.1
with:
extension-id: jnjobgjobffgmgfnkpkjfjkkfhfikmfl
zip-path: PasswordGenerator-Chromium.zip
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
Edge:
if: ${{ github.event_name == 'release' || github.event.inputs.edge == 'true' }}
needs: Pack-Chromium
runs-on: ubuntu-latest
steps:
- name: Download artifacts (Chromium)
uses: actions/download-artifact@v3
with:
name: Chromium
- name: Publish to Edge Addons
uses: wdzeng/edge-addon@v1.1.0
with:
product-id: ${{ secrets.EDGE_PRODUCT_ID }}
zip-path: PasswordGenerator-Chromium.zip
client-id: ${{ secrets.EDGE_CLIENT_ID }}
client-secret: ${{ secrets.EDGE_CLIENT_SECRET }}
access-token-url: ${{ secrets.EDGE_ACCESS_TOKEN_URL }}
Firefox:
if: ${{ github.event_name == 'release' || github.event.inputs.firefox == 'true' }}
needs: Pack-Firefox
runs-on: ubuntu-latest
steps:
- name: Download artifacts (Firefox)
uses: actions/download-artifact@v3
with:
name: Firefox
- name: Publish to Firefox
uses: wdzeng/firefox-addon@v1
with:
addon-guid: ${{ secrets.FIREFOX_EXT_UUID }}
xpi-path: PasswordGenerator-Firefox.zip
jwt-issuer: ${{ secrets.FIREFOX_API_KEY }}
jwt-secret: ${{ secrets.FIREFOX_CLIENT_SECRET }}
- uses: wdzeng/firefox-addon@main
with:
addon-guid: ${{ secrets.FIREFOX_EXT_UUID }}
xpi-path: packed-firefox.zip
jwt-issuer: ${{ secrets.FIREFOX_API_KEY }}
jwt-secret: ${{ secrets.FIREFOX_CLIENT_SECRET }}
+3 -3
View File
@@ -17,20 +17,20 @@ on:
paths-ignore:
- '**.md'
- 'LICENSE'
- 'PRIVACY'
- '**/cd_pipeline.yaml'
- '**/dependabot.yml'
- '**/pr_pipeline.yaml'
- '.vscode/*'
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main", "next" ]
paths-ignore:
- '**.md'
- 'LICENSE'
- 'PRIVACY'
- '**/cd_pipeline.yaml'
- '**/dependabot.yml'
- '**/pr_pipeline.yaml'
- '.vscode/*'
schedule:
- cron: '24 7 * * 3'
@@ -46,7 +46,7 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'typescript' ]
language: [ 'typescript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
+30
View File
@@ -0,0 +1,30 @@
name: PR next workflow
on:
push:
branches: [ master ]
paths:
- 'package.json'
permissions:
contents: write
jobs:
create-release-draft:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Get version from package.json
id: get_manifest
run: |
content=`cat ./package.json`
echo "::set-output name=manifest::${content}"
- uses: dev-build-deploy/release-me@v0.15.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
prefix: v
draft: true
version: ${{ fromJson(steps.get_manifest.outputs.manifest).version }}
release-notes: .github/release_description_template.md
+33 -59
View File
@@ -10,72 +10,46 @@ on:
- '**/cd_pipeline.yaml'
- '**/dependabot.yml'
- '**/codeql-analysis.yml'
- '**/pr_next.yaml'
- '.vscode/*'
- '.devcontainer/*'
workflow_dispatch:
inputs:
targets:
description: Targets
required: true
default: '["chrome","firefox"]'
type: choice
options:
- '["chrome","firefox"]'
- '["chrome"]'
- '["firefox"]'
jobs:
build:
runs-on: ubuntu-latest
container: node:20
strategy:
fail-fast: false
matrix:
target: ${{ fromJSON(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: freaktechnik/web-ext-lint@main
with:
extension-root: dist
self-hosted: false