Skip to content

Commit 6d5f8e2

Browse files
authored
Update Workflows and Dependencies (#8)
1 parent 4ce066b commit 6d5f8e2

17 files changed

Lines changed: 2278 additions & 6049 deletions

.github/workflows/build.yaml

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,26 @@ jobs:
1515
- name: "Checkout"
1616
uses: actions/checkout@v4
1717

18-
- name: "Setup Node"
18+
- name: "Setup Node 22"
1919
uses: actions/setup-node@v4
2020
with:
21-
node-version: 20
21+
node-version: 22
22+
cache: npm
23+
24+
- name: "Install"
25+
run: |
26+
npm install
2227
2328
- name: "Update Manifest Version"
2429
if: ${{ github.event_name == 'release' }}
2530
uses: cssnr/update-json-value-action@v1
2631

27-
- name: "Build All"
32+
- name: "Build"
2833
run: |
29-
npm ci
3034
npm run build
3135
3236
- name: "Upload to Actions"
37+
if: ${{ github.event_name == 'workflow_dispatch' }}
3338
uses: actions/upload-artifact@v4
3439
with:
3540
name: artifacts
@@ -39,8 +44,25 @@ jobs:
3944
if: ${{ github.event_name == 'release' }}
4045
uses: svenstaro/upload-release-action@v2
4146
with:
42-
repo_token: ${{ secrets.GITHUB_TOKEN }}
4347
file: web-ext-artifacts/*
4448
tag: ${{ github.ref }}
4549
overwrite: true
4650
file_glob: true
51+
52+
- name: "Update Release Notes Action"
53+
if: ${{ github.event_name == 'release' }}
54+
continue-on-error: true
55+
uses: smashedr/update-release-notes-action@master
56+
with:
57+
type: generic
58+
59+
- name: "Package Changelog Action"
60+
if: ${{ github.event_name == 'release' }}
61+
continue-on-error: true
62+
uses: cssnr/package-changelog-action@v1
63+
64+
- name: "Send Failure Notification"
65+
if: ${{ failure() && github.event_name == 'release' }}
66+
uses: sarisia/actions-status-discord@v1
67+
with:
68+
webhook: ${{ secrets.DISCORD_WEBHOOK }}

.github/workflows/draft.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: "Draft Release"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: ["master"]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
draft:
14+
name: "Draft Release"
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 5
17+
permissions:
18+
contents: write
19+
20+
steps:
21+
- name: "Checkout"
22+
uses: actions/checkout@v4
23+
24+
- name: "Draft Release Action"
25+
id: draft
26+
uses: cssnr/draft-release-action@master
27+
with:
28+
semver: patch
29+
prerelease: false
30+
31+
- name: "Process Release Draft URL"
32+
run: |
33+
echo "url: ${{ steps.draft.outputs.url }}"

.github/workflows/lint.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: "Lint"
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [master]
7+
push:
8+
branches: [master]
9+
10+
jobs:
11+
lint:
12+
name: "Lint"
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
if: ${{ !contains(github.event.head_commit.message, '#nolint') }}
16+
17+
steps:
18+
- name: "Checkout"
19+
uses: actions/checkout@v4
20+
21+
- name: "Setup Node 22"
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
#cache: npm
26+
27+
- name: "Install"
28+
id: install
29+
run: |
30+
npm install
31+
32+
- name: "ESLint"
33+
if: ${{ !cancelled() }}
34+
run: |
35+
npm run lint
36+
37+
- name: "Prettier"
38+
if: ${{ !cancelled() }}
39+
run: |
40+
npm run prettier
41+
42+
- name: "Yamllint"
43+
if: ${{ !cancelled() }}
44+
env:
45+
CONFIG: "{extends: relaxed, ignore: [node_modules/], rules: {line-length: {max: 119}}}"
46+
run: |
47+
echo "::group::List Files"
48+
yamllint -d '${{ env.CONFIG }}' --list-files .
49+
echo "::endgroup::"
50+
yamllint -d '${{ env.CONFIG }}' .
51+
52+
- name: "Actionlint"
53+
if: ${{ !cancelled() }}
54+
run: |
55+
echo "::group::Download"
56+
loc=$(curl -sI https://github.com/rhysd/actionlint/releases/latest | grep -i '^location:')
57+
echo "loc: ${loc}"
58+
tag=$(echo "${loc}" | sed -E 's|.*/tag/v?(.*)|\1|' | tr -d '\t\r\n')
59+
echo "tag: ${tag}"
60+
url="https://github.com/rhysd/actionlint/releases/latest/download/actionlint_${tag}_linux_amd64.tar.gz"
61+
echo "url: ${url}"
62+
curl -sL "${url}" | tar xz -C "${RUNNER_TEMP}" actionlint
63+
file "${RUNNER_TEMP}/actionlint"
64+
"${RUNNER_TEMP}/actionlint" --version
65+
echo "::endgroup::"
66+
"${RUNNER_TEMP}/actionlint" -color -verbose -shellcheck= -pyflakes=

.github/workflows/test.yaml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,47 +2,54 @@ name: "Test"
22

33
on:
44
workflow_dispatch:
5+
schedule:
6+
- cron: "18 18 * * 1,3,5"
7+
pull_request:
8+
branches: [master]
59
push:
6-
# branches: ["master"]
7-
# paths:
8-
# - "src/**"
9-
# - "tests/**"
10-
# pull_request:
11-
# branches: ["master"]
12-
# paths:
13-
# - "src/**"
14-
# - "tests/**"
10+
branches: [master]
11+
#paths:
12+
# - ".github/workflows/test.yaml"
13+
# - "src/**"
14+
# - "tests/**"
15+
# - "gulpfile.js"
16+
# - "manifest.json"
17+
# - "package.json"
18+
# - "package-lock.json"
1519

1620
jobs:
1721
test:
1822
name: "Test"
1923
runs-on: ubuntu-latest
2024
timeout-minutes: 5
2125
if: ${{ !contains(github.event.head_commit.message, '#notest') }}
26+
permissions:
27+
contents: write
28+
pull-requests: write
2229

2330
steps:
2431
- name: "Checkout"
2532
uses: actions/checkout@v4
2633

27-
- name: "Setup Node"
34+
- name: "Setup Node 22"
2835
uses: actions/setup-node@v4
2936
with:
30-
node-version: 20
37+
node-version: 22
38+
#cache: npm
3139

3240
- name: "Install"
3341
run: |
3442
npm install
3543
36-
- name: "Lint"
37-
run: |
38-
npm run lint
39-
4044
- name: "Test"
45+
id: test
4146
run: |
4247
npm run test
4348
4449
- name: "Push Artifacts"
4550
uses: cssnr/push-artifacts-action@master
51+
if: ${{ github.event_name == 'pull_request' }}
52+
continue-on-error: true
4653
with:
4754
source: "tests/screenshots/"
4855
dest: "/static"
@@ -51,5 +58,11 @@ jobs:
5158
pass: ${{ secrets.RSYNC_PASS }}
5259
port: ${{ secrets.RSYNC_PORT }}
5360
webhost: "https://artifacts.hosted-domains.com"
61+
#webhook: ${{ secrets.DISCORD_WEBHOOK }}
62+
#token: ${{ secrets.GITHUB_TOKEN }}
63+
64+
- name: "Schedule Failure Notification"
65+
uses: sarisia/actions-status-discord@v1
66+
if: ${{ failure() && github.event_name == 'schedule' }}
67+
with:
5468
webhook: ${{ secrets.DISCORD_WEBHOOK }}
55-
token: ${{ secrets.GITHUB_TOKEN }}

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.idea/
2+
.vscode/
3+
dist/
4+
node_modules/
5+
package-lock.json
6+
*.html

README.md

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=cssnr_auto-auth&metric=alert_status&label=quality)](https://sonarcloud.io/summary/overall?id=cssnr_auto-auth)
1212
[![GitHub Last Commit](https://img.shields.io/github/last-commit/cssnr/auto-auth?logo=github&logoColor=white&label=updated)](https://github.com/cssnr/auto-auth/graphs/commit-activity)
1313
[![GitHub Top Language](https://img.shields.io/github/languages/top/cssnr/auto-auth?logo=htmx&logoColor=white)](https://github.com/cssnr/auto-auth)
14+
[![GitHub Repo Size](https://img.shields.io/github/repo-size/cssnr/auto-auth?logo=bookstack&logoColor=white&label=repo%20size)](https://github.com/cssnr/auto-auth)
1415
[![GitHub Org Stars](https://img.shields.io/github/stars/cssnr?style=flat&logo=github&logoColor=white&label=org%20stars)](https://cssnr.github.io/)
1516
[![Discord](https://img.shields.io/discord/899171661457293343?logo=discord&logoColor=white&label=discord&color=7289da)](https://discord.gg/wXy6m2X8wY)
1617

@@ -19,28 +20,28 @@
1920
Modern Chrome Web Extension and Firefox Browser Addon for Automatic Basic HTTP Authentication with many Options and
2021
Features.
2122

22-
To take it for a test drive, install the addon and head over to: https://authenticationtest.com/HTTPAuth/
23+
To take it for a test drive, [install](#Install) the addon and head over to: https://authenticationtest.com/HTTPAuth/
2324
then enter the username `user` and password `pass`
2425

25-
* [Install](#Install)
26-
* [Features](#Features)
26+
- [Install](#Install)
27+
- [Features](#Features)
2728
- [Upcoming Features](#Upcoming-Features)
2829
- [Known Issues](#Known-Issues)
29-
* [Configuration](#Configuration)
30-
* [Migration](#Migration)
31-
- [AutoAuth](#AutoAuth)
32-
- [Basic Authentication](#Basic-Authentication)
33-
- [Other or Manual](#Other-or-Manual)
34-
* [Security](#Security)
35-
* [Support](#Support)
36-
* [Development](#Development)
30+
- [Configuration](#Configuration)
31+
- [Migration](#Migration)
32+
- [AutoAuth](#AutoAuth)
33+
- [Basic Authentication](#Basic-Authentication)
34+
- [Other or Manual](#Other-or-Manual)
35+
- [Security](#Security)
36+
- [Support](#Support)
37+
- [Development](#Development)
3738
- [Building](#Building)
38-
* [Contributing](#Contributing)
39+
- [Contributing](#Contributing)
3940

4041
## Install
4142

42-
* [Google Chrome Web Store](https://chromewebstore.google.com/detail/auto-auth/gpoiggobidhogpmmlakahiaaegibnogm)
43-
* [Mozilla Firefox Add-ons](https://addons.mozilla.org/addon/auto-auth)
43+
- [Google Chrome Web Store](https://chromewebstore.google.com/detail/auto-auth/gpoiggobidhogpmmlakahiaaegibnogm)
44+
- [Mozilla Firefox Add-ons](https://addons.mozilla.org/addon/auto-auth)
4445

4546
[![Chrome](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/chrome_48.png)](https://chromewebstore.google.com/detail/auto-auth/gpoiggobidhogpmmlakahiaaegibnogm)
4647
[![Firefox](https://raw.githubusercontent.com/smashedr/logo-icons/master/browsers/firefox_48.png)](https://addons.mozilla.org/addon/auto-auth)
@@ -52,6 +53,8 @@ then enter the username `user` and password `pass`
5253
All **Chromium** Based Browsers can install the extension from
5354
the [Chrome Web Store](https://chromewebstore.google.com/detail/auto-auth/gpoiggobidhogpmmlakahiaaegibnogm).
5455

56+
[![QR Code GitHub](https://raw.githubusercontent.com/smashedr/repo-images/refs/heads/master/auto-auth/qr-firefox.png)](https://addons.mozilla.org/addon/auto-auth)
57+
5558
## Features
5659

5760
- Save Logins for HTTP Basic Authentication
@@ -83,13 +86,15 @@ Long-term Goals for Improved Security:
8386
8487
### Known Issues
8588

86-
* Only allows saving 1 set of credentials per host
87-
* Most browsers will offer to save passwords on login and edit
88-
* A 401 response from a Service Worker is not properly intercepted:
89+
- Only allows saving 1 set of credentials per host.
90+
- Most browsers will offer to save passwords on login and edit.
91+
- Incognito and Private Browsing will not allow logging into new sites.
92+
- You must save the credentials first or add them manually.
93+
- A 401 response from a Service Worker is not properly intercepted:
8994
- Firefox: Shows a generic 401 page, use `Ctrl+F5`
90-
* Once credentials are saved, requests will work as normal.
95+
- Once credentials are saved, requests will work as normal.
9196
- Chrome: Shows a default credentials prompt, Cancel and press `Ctrl+F5`
92-
* This behavior may continue after saving credentials.
97+
- This behavior may continue after saving credentials.
9398

9499
> [!TIP]
95100
> **Don't see your issue here?**
@@ -272,15 +277,16 @@ or [Mozilla](https://addons.mozilla.org/addon/auto-auth) and to star this projec
272277

273278
Other Web Extensions I have created and published:
274279

275-
- [Link Extractor](https://github.com/cssnr/link-extractor)
276-
- [Open Links in New Tab](https://github.com/cssnr/open-links-in-new-tab)
277-
- [Auto Auth](https://github.com/cssnr/auto-auth)
278-
- [Cache Cleaner](https://github.com/cssnr/cache-cleaner)
279-
- [HLS Video Downloader](https://github.com/cssnr/hls-video-downloader)
280-
- [SMWC Web Extension](https://github.com/cssnr/smwc-web-extension)
281-
- [PlayDrift Extension](https://github.com/cssnr/playdrift-extension)
282-
- [ASN Plus](https://github.com/cssnr/asn-plus)
283-
- [Aviation Tools](https://github.com/cssnr/aviation-tools)
284-
- [Text Formatter](https://github.com/cssnr/text-formatter)
280+
- [Link Extractor](https://github.com/cssnr/link-extractor?tab=readme-ov-file#readme)
281+
- [Open Links in New Tab](https://github.com/cssnr/open-links-in-new-tab?tab=readme-ov-file#readme)
282+
- [Auto Auth](https://github.com/cssnr/auto-auth?tab=readme-ov-file#readme)
283+
- [Cache Cleaner](https://github.com/cssnr/cache-cleaner?tab=readme-ov-file#readme)
284+
- [HLS Video Downloader](https://github.com/cssnr/hls-video-downloader?tab=readme-ov-file#readme)
285+
- [Obtainium Extension](https://github.com/cssnr/obtainium-extension?tab=readme-ov-file#readme)
286+
- [SMWC Web Extension](https://github.com/cssnr/smwc-web-extension?tab=readme-ov-file#readme)
287+
- [PlayDrift Extension](https://github.com/cssnr/playdrift-extension?tab=readme-ov-file#readme)
288+
- [ASN Plus](https://github.com/cssnr/asn-plus?tab=readme-ov-file#readme)
289+
- [Aviation Tools](https://github.com/cssnr/aviation-tools?tab=readme-ov-file#readme)
290+
- [Text Formatter](https://github.com/cssnr/text-formatter?tab=readme-ov-file#readme)
285291

286292
For a full list of current projects visit: [https://cssnr.github.io/](https://cssnr.github.io/)

eslint.config.mjs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import js from '@eslint/js'
2+
3+
export default [
4+
js.configs.recommended,
5+
{
6+
languageOptions: {
7+
ecmaVersion: 'latest',
8+
sourceType: 'module',
9+
},
10+
settings: {
11+
env: {
12+
browser: true,
13+
es2021: true,
14+
jquery: true,
15+
webextensions: true,
16+
},
17+
},
18+
rules: {
19+
'no-undef': 'off',
20+
'no-extra-semi': 'off',
21+
},
22+
},
23+
]

gulpfile.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ gulp.task('fontawesome', () => {
2323
'node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-*',
2424
'node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-*',
2525
],
26-
{ base: 'node_modules/@fortawesome/fontawesome-free' }
26+
{
27+
base: 'node_modules/@fortawesome/fontawesome-free',
28+
encoding: false,
29+
}
2730
)
2831
.pipe(gulp.dest('src/dist/fontawesome'))
2932
})

0 commit comments

Comments
 (0)