1
0
mirror of https://github.com/XFox111/PasswordGeneratorExtension.git synced 2026-04-22 08:08:01 +03:00

Major 2.0 (#8)

* Migrated to React 18 and FluentUI 9

* Added Ukranian translation

* Updated GitHub templates

* Updated CI/CD
- Added CodeQL and Dependabot pipelines
- Removed Whitesource Bolt integration
- Added PR pipeline
- Update release pipeline to meet ReactJS
- Added Edge publish to pipeline
- Updated PR checklist

* Updated repo docs

* Moved dependabot yml to the right place

* Update README.md

* Added path filters to pipelines
This commit is contained in:
Eugene Fox
2022-09-06 19:12:02 +03:00
committed by GitHub
parent 8991884494
commit 03d74f93d6
56 changed files with 11817 additions and 1134 deletions
+4 -3
View File
@@ -3,8 +3,7 @@ name: Bug report
about: Create a report to help us improve the extension
title: ''
labels: bug
assignees: ''
assignees: @XFox111
---
### Description
@@ -30,4 +29,6 @@ Please provide the following information:
- Extension version: [e.g. 1.5]
### Additional context
Add any other context about the problem here.
Add any other context about the problem here.
- [ ] Are you willing to submit a pull request to implement this feature yourself?
+4 -3
View File
@@ -3,8 +3,7 @@ name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
assignees: @XFox111
---
**Is your feature request related to a problem? Please describe.**
@@ -17,4 +16,6 @@ A clear and concise description of what you want to happen.
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.
Add any other context or screenshots about the feature request here.
- [ ] Are you willing to submit a pull request to implement this feature yourself?
+29
View File
@@ -0,0 +1,29 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
target-branch: "main"
assignees:
- "xfox111"
reviewers:
- "xfox111"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "main"
assignees:
- "xfox111"
reviewers:
- "xfox111"
schedule:
interval: "weekly"
+8 -3
View File
@@ -1,9 +1,14 @@
fixes:
## Description
> Put short description of the pull request here
fixes: #issue_number
## Changelog
- Item 1
- Item 2
- Item 3
## PR Checklist
- [ ] Change extension version in the manifest
## PR Checklist (main branch)
- [ ] Update extension version in `package.json`
- [ ] [Post-merge] Create a release to publish the new version
- [ ] [Post-deploy] Update changelog for Firefox webstore
+147
View File
@@ -0,0 +1,147 @@
name: Release pipeline
on:
release:
types: [published]
workflow_dispatch:
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Update manifest version
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"
- 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'
uses: actions/upload-artifacts@v3.0.0
with:
name: 'Build'
path: 'build'
Firefox:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
name: 'Build'
- name: Build Extension for Firefox
id: web-ext-build
uses: kewisch/action-web-ext@v1
with:
cmd: build
source: Build
- name: 'Sign & publish'
id: web-ext-sign
uses: kewisch/action-web-ext@v1
with:
cmd: sign
channel: listed
source: ${{ steps.web-ext-build.outputs.target }}
apiKey: ${{ secrets.FIREFOX_API_KEY }}
apiSecret: ${{ secrets.FIREFOX_CLIENT_SECRET }}
- name: Drop artifacts
uses: actions/upload-artifact@v2
with:
name: 'Firefox build'
path: ${{ steps.web-ext-sign.outputs.target }}
- name: Upload artifact
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: ${{ steps.web-ext-sign.outputs.target }}
tags: true
draft: false
Chrome:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
name: 'Build'
- name: Pack extension
uses: TheDoctor0/zip-release@0.4.1
with:
directory: Build
filename: ./PasswordGenerator.zip
- name: Publish to Chrome Webstore
uses: SebastienGllmt/chrome-addon@v3
with:
extension: jnjobgjobffgmgfnkpkjfjkkfhfikmfl
zip: ./PasswordGenerator.zip
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
- name: Drop artifacts
uses: actions/upload-artifact@v2
with:
name: 'Chrome Artifacts'
path: ./PasswordGenerator.zip
- name: Upload artifact
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: ./PasswordGenerator.zip
tags: true
draft: false
Edge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
name: 'Build'
- name: Pack extension
uses: TheDoctor0/zip-release@0.4.1
with:
directory: Build
filename: ./PasswordGenerator.zip
- name: Publish to Edge Addons
uses: wdzeng/edge-addon@v1
with:
product-id: 0RDCKDGH3MWT
zip-path: ./PasswordGenerator.zip
client-id: ${{ secrets.EDGE_CLIENT_ID }}
client-secret: ${{ secrets.EDGE_CLIENT_SECRET }}
access-token-url: ${{ secrets.EDGE_ACCESS_TOKEN_URL }}
-70
View File
@@ -1,70 +0,0 @@
name: CI
on:
release:
types: [published]
jobs:
Firefox:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Extension for Firefox
id: web-ext-build
uses: kewisch/action-web-ext@v1
with:
cmd: build
- name: 'Sign & publish'
id: web-ext-sign
uses: kewisch/action-web-ext@v1
with:
cmd: sign
channel: listed
source: ${{ steps.web-ext-build.outputs.target }}
apiKey: ${{ secrets.FIREFOX_API_KEY }}
apiSecret: ${{ secrets.FIREFOX_CLIENT_SECRET }}
- name: Drop artifacts
uses: actions/upload-artifact@v2
with:
name: 'Firefox Artefacts'
path: ${{ steps.web-ext-build.outputs.target }}
Chrome:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Pack extension
uses: TheDoctor0/zip-release@0.4.1
with:
filename: ./PasswordGenerator.zip
exclusions: '.git/* .vscode/* .github/* *.md'
- name: Publish to Chrome Webstore
uses: SebastienGllmt/chrome-addon@v3
with:
extension: jnjobgjobffgmgfnkpkjfjkkfhfikmfl
zip: ./PasswordGenerator.zip
client-id: ${{ secrets.CHROME_CLIENT_ID }}
client-secret: ${{ secrets.CHROME_CLIENT_SECRET }}
refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }}
- name: Upload artifact
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: ./PasswordGenerator.zip
tags: true
draft: false
- name: Drop artifacts
uses: actions/upload-artifact@v2
with:
name: 'Chrome Artifacts'
path: ./PasswordGenerator.zip
+86
View File
@@ -0,0 +1,86 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "main" ]
paths-ignore:
- '**.md'
- 'LICENSE'
- 'PRIVACY'
- '**/cd_pipeline.yaml'
- '**/dependabot.yml'
- '**/pr_pipeline.yaml'
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
paths-ignore:
- '**.md'
- 'LICENSE'
- 'PRIVACY'
- '**/cd_pipeline.yaml'
- '**/dependabot.yml'
- '**/pr_pipeline.yaml'
schedule:
- cron: '24 7 * * 3'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'typescript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
+36
View File
@@ -0,0 +1,36 @@
name: PR check pipeline
on:
pull_request:
branches:
- main
paths-ignore:
- '**.md'
- 'LICENSE'
- 'PRIVACY'
- '**/cd_pipeline.yaml'
- '**/dependabot.yml'
- '**/codeql-analysis.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- 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'
uses: actions/upload-artifact@v3.0.0
with:
name: 'Package'
path: 'build'