Skip to content

Commit 1ec5baf

Browse files
authored
chore: merge pull request #67 from Questionable-Content-Extensions/release/1.0.0
Release version 1.0.0
2 parents 41f6336 + 62fad10 commit 1ec5baf

322 files changed

Lines changed: 77734 additions & 21235 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.babelrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.dockerignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
node_modules
2-
npm-debug.log
2+
storybook-static
3+
build
34
dist
5+
Dockerfile
6+
.dockerignore

.eslintrc.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

.eslintrc.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"extends": ["react-app"],
3+
"ignorePatterns": [
4+
"dist/**",
5+
"build/**",
6+
"storybook-static/**",
7+
"!.storybook"
8+
],
9+
"rules": {
10+
"no-unused-vars": "off"
11+
},
12+
"overrides": [
13+
{
14+
"files": ["**/*.ts?(x)"],
15+
"rules": {
16+
"@typescript-eslint/no-unused-vars": [
17+
"warn",
18+
{
19+
"argsIgnorePattern": "^_",
20+
"varsIgnorePattern": "^_"
21+
}
22+
]
23+
}
24+
},
25+
{
26+
"files": ["**/*.stories.*"],
27+
"rules": {
28+
"import/no-anonymous-default-export": "off"
29+
}
30+
}
31+
]
32+
}

.flowconfig

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/FUNDING.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: ilyvion # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

.github/workflows/CI.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [develop]
6+
pull_request:
7+
branches: [develop]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Use Node.js 18.x
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 18.x
20+
cache: 'npm'
21+
22+
- name: Install Node modules
23+
run: npm ci
24+
25+
- name: Run ESLint
26+
run: npx eslint .
27+
28+
# Tests are currently kind of broken. Leave it for another day.
29+
30+
#- name: Run tests
31+
# run: npm test
32+
33+
# - name: Install Playwright
34+
# run: npx playwright install --with-deps
35+
36+
# - name: Build Storybook
37+
# run: npm run build-storybook
38+
39+
# - name: Run Storybook tests
40+
# run: |
41+
# npx concurrently -k -s last -n "SB,TEST" -c "magenta,blue" \
42+
# "npx http-server storybook-static --port 6006 --silent" \
43+
# "npx wait-on http://127.0.0.1:6006/ && npm run test-storybook"
44+
45+
- name: Ensure everything builds
46+
run: npm run build
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: 'Draft new release'
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'The version you want to release.'
8+
required: true
9+
10+
jobs:
11+
draft-new-release:
12+
name: 'Draft a new release'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
- name: Create release branch
18+
run: git checkout -b release/${{ github.event.inputs.version }}
19+
20+
- name: Update changelog
21+
uses: thomaseizinger/keep-a-changelog-new-release@1.1.0
22+
with:
23+
version: ${{ github.event.inputs.version }}
24+
25+
# In order to make a commit, we need to initialize a user.
26+
- name: Initialize mandatory git config
27+
run: |
28+
git config user.name "GitHub Actions"
29+
git config user.email noreply@github.com
30+
31+
# This step will differ depending on your project setup
32+
# Fortunately, yarn has a built-in command for doing this!
33+
- name: Bump version in package.json
34+
run: npm version ${{ github.event.inputs.version }} --no-git-tag-version
35+
36+
- name: Commit changelog and manifest files
37+
id: make-commit
38+
run: |
39+
git add CHANGELOG.md package.json
40+
git commit --message "chore: prepare release ${{ github.event.inputs.version }}"
41+
42+
echo "::set-output name=commit::$(git rev-parse HEAD)"
43+
44+
- name: Push new branch
45+
run: git push origin release/${{ github.event.inputs.version }}
46+
47+
- name: Create pull request
48+
uses: thomaseizinger/create-pull-request@1.0.0
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
with:
52+
head: release/${{ github.event.inputs.version }}
53+
base: main
54+
title: Release version ${{ github.event.inputs.version }}
55+
reviewers: ${{ github.actor }}
56+
body: |
57+
Hi @${{ github.actor }}!
58+
59+
This PR was created in response to a manual trigger of the release workflow here: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}.
60+
I've updated the changelog and bumped the versions in the manifest files in this commit: ${{ steps.make-commit.outputs.commit }}.
61+
62+
Merging this PR will create a GitHub release and upload any assets that are created as part of the release build.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: 'Publish new release'
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- closed
9+
10+
jobs:
11+
release:
12+
name: Publish new release
13+
runs-on: ubuntu-latest
14+
# only merged pull requests that begin with 'release/' or 'hotfix/' must trigger this job
15+
if: github.event.pull_request.merged == true &&
16+
(startsWith(github.event.pull_request.head.ref, 'release/') || startsWith(github.event.pull_request.head.ref, 'hotfix/'))
17+
18+
steps:
19+
- name: Extract version from branch name (for release branches)
20+
if: startsWith(github.event.pull_request.head.ref, 'release/')
21+
run: |
22+
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
23+
VERSION=${BRANCH_NAME#release/}
24+
25+
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
26+
27+
- name: Extract version from branch name (for hotfix branches)
28+
if: startsWith(github.event.pull_request.head.ref, 'hotfix/')
29+
run: |
30+
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
31+
VERSION=${BRANCH_NAME#hotfix/}
32+
33+
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
34+
35+
- uses: actions/checkout@v3
36+
37+
- name: Use Node.js 18.x
38+
uses: actions/setup-node@v3
39+
with:
40+
node-version: 18.x
41+
cache: 'npm'
42+
43+
- name: Install Node modules
44+
run: npm ci
45+
46+
- name: Build scripts
47+
run: npm run build-userscript
48+
49+
- name: Extract release notes
50+
id: extract-release-notes
51+
uses: ffurrer2/extract-release-notes@v1
52+
with:
53+
changelog_file: CHANGELOG.md
54+
55+
- name: Release
56+
uses: softprops/action-gh-release@v1
57+
with:
58+
target_commitish: ${{ github.event.pull_request.merge_commit_sha }}
59+
tag_name: ${{ env.RELEASE_VERSION }}
60+
name: ${{ env.RELEASE_VERSION }}
61+
draft: false
62+
prerelease: false
63+
body: ${{ steps.extract-release-notes.outputs.release_notes }}
64+
files: |
65+
./dist/qc-ext.user.js
66+
./dist/qc-ext.meta.js
67+
68+
- name: Merge main into dev branch
69+
uses: thomaseizinger/create-pull-request@1.0.0
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
with:
73+
head: main
74+
base: develop
75+
title: Merge main into develop branch
76+
body: |
77+
This PR merges the main branch back into develop.
78+
This happens to ensure that the updates that happend on the release branch, i.e. CHANGELOG and manifest updates are also present on the dev branch.

.gitignore

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,30 @@
1-
/.sass-cache
2-
/assets/generated
3-
/assets/removeFlow
4-
/dist
5-
/nbproject/private
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
64
/node_modules
7-
/.vagrant
8-
/.tmp
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# deployment
15+
/dist
16+
17+
# misc
18+
.DS_Store
19+
.env.local
20+
.env.development.local
21+
.env.test.local
22+
.env.production.local
23+
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
927

28+
# storybook
29+
/src/stories
30+
/storybook-static

0 commit comments

Comments
 (0)