Skip to content

Commit 4f0b39d

Browse files
authored
Meta: Drop local release dependencies (refined-github#3933)
1 parent c4af309 commit 4f0b39d

4 files changed

Lines changed: 17103 additions & 27074 deletions

File tree

.github/workflows/release.yml

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
env: {}
1+
env:
2+
DIRECTORY: distribution
23

3-
# DO NOT EDIT BELOW, USE: npx ghat fregante/ghatemplates/webext --set 'on.schedule=[{"cron": "42 17 * * 4"}]'
4+
# FILE GENERATED WITH: npx ghat fregante/ghatemplates/webext
5+
# SOURCE: https://github.com/fregante/ghatemplates
6+
# OPTIONS: {"set":["on.schedule=[{\"cron\": \"42 17 1 * *\"}]"]}
47

58
name: Release
69
on:
@@ -10,22 +13,23 @@ on:
1013
jobs:
1114
Version:
1215
outputs:
13-
created: '${{ steps.daily-version.outputs.created }}'
14-
version: '${{ steps.daily-version.outputs.version }}'
16+
created: ${{ steps.daily-version.outputs.created }}
17+
version: ${{ steps.daily-version.outputs.version }}
1518
runs-on: ubuntu-latest
1619
steps:
1720
- uses: actions/checkout@v2
1821
with:
1922
fetch-depth: 20
20-
- run: npm ci
23+
- name: install
24+
run: npm ci || npm install
2125
- run: npm test
2226
- uses: fregante/daily-version-action@v1
2327
name: Create tag if necessary
2428
id: daily-version
2529
- uses: notlmn/release-with-changelog@v3
2630
if: steps.daily-version.outputs.created
2731
with:
28-
token: '${{ secrets.GITHUB_TOKEN }}'
32+
token: ${{ secrets.GITHUB_TOKEN }}
2933
exclude: true
3034
Submit:
3135
needs: Version
@@ -39,17 +43,27 @@ jobs:
3943
runs-on: ubuntu-latest
4044
steps:
4145
- uses: actions/checkout@v2
42-
- run: npm install
46+
- name: install
47+
run: npm ci || npm install
4348
- run: npm run build
4449
- name: Update extension’s meta
4550
run: >-
46-
npx dot-json distribution/manifest.json version ${{
51+
npx dot-json@1 $DIRECTORY/manifest.json version ${{
4752
needs.Version.outputs.version }}
48-
- run: 'npm run release:${{ matrix.command }}'
53+
- name: Submit
54+
run: |
55+
case ${{ matrix.command }} in
56+
chrome)
57+
cd $DIRECTORY && npx chrome-webstore-upload-cli@1 upload --auto-publish
58+
;;
59+
firefox)
60+
cd $DIRECTORY && npx web-ext-submit@5
61+
;;
62+
esac
4963
env:
50-
EXTENSION_ID: '${{ secrets.EXTENSION_ID }}'
51-
CLIENT_ID: '${{ secrets.CLIENT_ID }}'
52-
CLIENT_SECRET: '${{ secrets.CLIENT_SECRET }}'
53-
REFRESH_TOKEN: '${{ secrets.REFRESH_TOKEN }}'
54-
WEB_EXT_API_KEY: '${{ secrets.WEB_EXT_API_KEY }}'
55-
WEB_EXT_API_SECRET: '${{ secrets.WEB_EXT_API_SECRET }}'
64+
EXTENSION_ID: ${{ secrets.EXTENSION_ID }}
65+
CLIENT_ID: ${{ secrets.CLIENT_ID }}
66+
CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }}
67+
REFRESH_TOKEN: ${{ secrets.REFRESH_TOKEN }}
68+
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
69+
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}

contributing.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ Suggestions and pull requests are highly encouraged! Have a look at the [open is
99
- [JSX](https://reactjs.org/docs/introducing-jsx.html) is used to create DOM elements.
1010
- All the [latest DOM APIs](https://github.com/WebReflection/dom4#features) and JavaScript features are available because the extension only has to work in the latest Chrome and Firefox. 🎉
1111
- Each JavaScript feature lives in its own file under [`source/features`](https://github.com/sindresorhus/refined-github/tree/main/source/features) and it's imported in [`source/refined-github.ts`](https://github.com/sindresorhus/refined-github/blob/main/source/refined-github.ts).
12-
- See what a _feature_ [looks like](https://github.com/sindresorhus/refined-github/blob/main/source/features/user-profile-follower-badge.tsx).
13-
- Follow [the styleguide](https://github.com/sindresorhus/refined-github/blob/main/readme.md#L62) that appears in the Readme's source to write readable descriptions.
12+
- See what a feature [looks like](https://github.com/sindresorhus/refined-github/blob/main/source/features/user-profile-follower-badge.tsx).
13+
- Follow [the styleguide](https://github.com/sindresorhus/refined-github/blob/main/readme.md#L70) that appears in the Readme's source to write readable descriptions.
1414
- Refined GitHub tries to integrate as best as possible, so [GitHub's own styleguide](https://primer.style/css) might come in useful.
1515

1616
## `features.add`
@@ -53,15 +53,15 @@ function init(): void {
5353
}
5454

5555
void features.add(__filebasename, {
56-
/** This only adds the shortcut to the help screen, it doesn't enable it. */
56+
// This only adds the shortcut to the help screen, it doesn't enable it.
5757
shortcuts: {
5858
'': 'Edit your last comment'
5959
},
6060

61-
/** Whether to wait for DOM ready before running `init`. `false` makes `init` run right as soon as `body` is found. @default true */
61+
// Whether to wait for DOM ready before running `init`. `false` makes `init` run right as soon as `body` is found. @default true
6262
awaitDomReady: false,
6363

64-
/** Rarely needed: When pressing the back button, the DOM and listeners are still there, so normally `init` isn’t called again. If this is true, it’s called anyway. @default false */
64+
// Rarely needed: When pressing the back button, the DOM and listeners are still there, so normally `init` isn’t called again. If this is true, it’s called anyway. @default false
6565
repeatOnBackButton: true,
6666
include: [
6767
pageDetect.isUserProfile,
@@ -113,4 +113,6 @@ npm run start # Open extension in Chrome
113113
npm run start:firefox # Open extension in Firefox
114114
```
115115

116+
**Note**: They both require [web-ext](https://github.com/mozilla/web-ext) to be installed globally. Run `npm i -g web-ext`
117+
116118
Or you can [load it manually in Chrome](https://www.smashingmagazine.com/2017/04/browser-extension-edge-chrome-firefox-opera-brave-vivaldi/#google-chrome-opera-vivaldi) or [Firefox](https://www.smashingmagazine.com/2017/04/browser-extension-edge-chrome-firefox-opera-brave-vivaldi/#mozilla-firefox).

0 commit comments

Comments
 (0)