-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update main with latest develop #100
- Loading branch information
Showing
477 changed files
with
21,341 additions
and
12,646 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
node_modules/ | ||
*.min.js | ||
*.map | ||
*.snap | ||
**/prisma/src/db.ts | ||
**/prisma-cli/** | ||
**/dist/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
node: true, | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
'prettier', | ||
], | ||
overrides: [ | ||
{ | ||
files: ['*.jsx', '*.tsx', '*.ts'], | ||
rules: { | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'no-console': ['error', { allow: ['warn', 'error', 'debug'] }], | ||
'react/react-in-jsx-scope': 'off', | ||
}, | ||
}, | ||
{ | ||
files: ['*.config.js', '.eslintrc.js'], | ||
rules: { | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'import/no-commonjs': 'off', | ||
'sort-keys': 'off', | ||
'unicorn/prefer-module': 'off', | ||
}, | ||
}, | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaFeatures: { | ||
jsx: true, | ||
}, | ||
project: 'tsconfig.eslint.json', | ||
tsconfigRootDir: __dirname, | ||
}, | ||
plugins: ['@typescript-eslint', 'simple-import-sort', 'prettier', 'sort-keys-fix', 'react'], | ||
root: true, | ||
rules: { | ||
'import/no-unresolved': 'off', | ||
'import/no-useless-path-segments': 'off', | ||
'no-console': 'error', | ||
'simple-import-sort/exports': 'error', | ||
'simple-import-sort/imports': 'error', | ||
'sort-keys-fix/sort-keys-fix': 'warn', | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Contributing | ||
|
||
You can contribute by opening new issues or PRs. Do not make random PRs without talking with me first - to ensure nobody's time and effort is wasted, please follow the guidelines below. | ||
|
||
## Guidelines | ||
|
||
1. Check to see if an issue already exists relevant to your feature/topic | ||
2. Create an issue (if an issue does not already exist) and express interest in working it (see the [issues](#issues) section below) | ||
3. Create a fork of the repository. | ||
4. Create a new feature branch **off of the `develop` branch** - _not_ `main`. | ||
5. Add appropiate documentation, tests, etc, if necessary. | ||
6. Ensure you have your code formatters properly configured (both Prettier and Rustfmt). | ||
7. Once you've completed your changes, create a PR from your feature branch into `develop` - _not_ `main`. | ||
8. Be sure to update your feature branch with any new changes **before** making the PR. | ||
9. Follow the PR naming format to help ensure the changelog generator properly picks up your additions: | ||
|
||
``` | ||
<type>: <description> | ||
``` | ||
|
||
Where `type` is one of the following: | ||
|
||
- `feat`: A new feature | ||
- `fix`: A bug fix | ||
- `docs`: Documentation only changes | ||
- `refactor`: A code change that neither fixes a bug nor adds a feature | ||
- `perf`: A code change that improves performance | ||
- `test`: Adding missing tests or correcting existing tests | ||
- `ci`: Changes to our CI configuration files and scripts | ||
- `chore`: Other changes that don't modify `src` or `test` files, such as updating `package.json` or `README.md` | ||
- `revert`: Reverts a previous commit | ||
- `WIP`: Work in progress | ||
|
||
The `description` should contain a _succinct_ description of the change: | ||
|
||
- use the imperative, present tense: "change" not "changed" nor "changes" | ||
- don't capitalize the first letter | ||
- no dot (.) at the end | ||
|
||
Examples: | ||
|
||
``` | ||
feat: add support for Reading Lists | ||
fix: remove broken link | ||
docs: update CONTRIBUTING.md to include PR naming format | ||
``` | ||
|
||
10. Stick around and make sure your PR passes all checks and gets merged! | ||
|
||
## Issues | ||
|
||
I don't have any strict guidelines for issues, but do please try and be as descriptive as possible. There are a few templates to help you out, but in general: | ||
|
||
- If you're interested in working on an issue, please leave a comment so that I know you're interested. | ||
- If you're opening an issue to request a feature, please try and explain why you think it would be a good addition to the project. If applicable, include example use cases. | ||
- If you're opening an issue to report a bug, try to fill in the template as best you can. If you can, please include a minimal reproduction of the bug (video, code, etc). | ||
- If you're not sure if an issue is relevant appropriate, e.g. if you have more of a question to ask, feel free to pop in the [Discord server](https://discord.gg/63Ybb7J3as) and ask! | ||
|
||
**Please don't ghost an issue you've been assigned** - if you're no longer interested in working on it, that is totally okay! Just leave a comment on the issue so that I know you're no longer interested and I can reassign it to someone else. I will never be offended if you no longer want to work on an issue - I'm just trying to make sure that nobody's time and effort is wasted. | ||
|
||
## A note on merging | ||
|
||
I will not merge your PR until: | ||
|
||
- It aligns with the [guidelines](#guidelines) outlined above | ||
- In most cases, any issues outside of a malformed PR name, I will not fix for you. If you're unsure how to fix it, ask for help. Stale PRs will be closed after 10 days. | ||
- All checks pass | ||
- At least one maintainer has reviewed your PR | ||
|
||
All PRs to `develop` will be squashed. All PRs to `main` will be merge commits. This is to ensure that the commit history is clean and easy to follow, and to ensure that the changelog generator works properly. | ||
|
||
Thanks for considering to contribute! :heart: |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: 'Build Stump desktop app' | ||
description: 'Compile the Stump desktop app' | ||
|
||
inputs: | ||
platform: | ||
description: 'The plaform of the runner' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
# - name: Configure environment | ||
# run: | | ||
# if [[ ${{ inputs.platform }} == 'linux' || ${{ inputs.platform }} == 'windows' ]]; then | ||
# echo "RUN_SETUP=false" >> $GITHUB_ENV | ||
# else | ||
# echo "RUN_SETUP=true" >> $GITHUB_ENV | ||
# fi | ||
|
||
- name: Setup rust | ||
uses: ./.github/actions/setup-cargo | ||
|
||
- name: Generate Prisma client | ||
uses: ./.github/actions/setup-prisma | ||
|
||
- name: Copy bundled web app | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: webapp | ||
path: ./apps/desktop/dist | ||
|
||
- name: Compile desktop app | ||
shell: bash | ||
run: cargo build --package stump_desktop --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: 'Build docker image' | ||
description: 'Build and load or push a tagged docker image for stump' | ||
|
||
inputs: | ||
username: | ||
description: 'Username for docker login' | ||
required: true | ||
password: | ||
description: 'Token for docker login' | ||
required: true | ||
load: | ||
description: 'Set output-type to docker' | ||
default: 'true' | ||
push: | ||
description: 'Set output-type to registry' | ||
default: 'false' | ||
tags: | ||
description: 'List of tags to assigned to the image' | ||
default: 'nightly' | ||
platforms: | ||
description: 'List of platforms to build' | ||
required: true | ||
discord-webhook: | ||
description: 'Discord webhook to send notifications to' | ||
required: true | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Get commit short sha | ||
run: echo "GIT_REV=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Format tags | ||
run: | | ||
echo "TAGS=$(echo ${{ inputs.tags }} | sed -e 's/,/,aaronleopold\/stump:/g' | sed -e 's/^/aaronleopold\/stump:/')" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Setup rust | ||
uses: ./.github/actions/setup-cargo | ||
|
||
- name: Generate Prisma client | ||
uses: ./.github/actions/setup-prisma | ||
|
||
# TODO: uncomment once cache stuff is resolved... | ||
# - name: Setup Docker layers cache | ||
# uses: actions/cache@v3 | ||
# with: | ||
# path: /tmp/.buildx-cache | ||
# key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
# restore-keys: | | ||
# ${{ runner.os }}-buildx- | ||
|
||
# We only need QEMU when an arm* platform is targeted | ||
- name: Check QEMU requirement | ||
id: check-qemu | ||
run: | | ||
if [[ ${{ inputs.platforms }} == *"arm"* ]]; then | ||
echo "SETUP_QEMU=1" >> $GITHUB_OUTPUT | ||
else | ||
echo "SETUP_QEMU=0" >> $GITHUB_OUTPUT | ||
fi | ||
shell: bash | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
if: ${{ steps.check-qemu.outputs.SETUP_QEMU == '1' }} | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ inputs.username }} | ||
password: ${{ inputs.password }} | ||
|
||
- name: Run buildx build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
build-args: | | ||
"GIT_REV=${{ env.GIT_REV }}" | ||
file: scripts/release/Dockerfile | ||
platforms: ${{ inputs.platforms }} | ||
load: ${{ inputs.load }} | ||
push: ${{ inputs.push }} | ||
tags: ${{ env.TAGS }} | ||
# TODO: uncomment once cache stuff is resolved... | ||
# cache-from: type=local,src=/tmp/.buildx-cache | ||
# cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max | ||
|
||
# https://github.com/docker/build-push-action/issues/252 | ||
# TODO: https://github.com/moby/buildkit/issues/1896 | ||
# TODO: uncomment once cache stuff is resolved... | ||
# - name: Move buildx cache | ||
# run: | | ||
# rm -rf /tmp/.buildx-cache | ||
# mv /tmp/.buildx-cache-new /tmp/.buildx-cache | ||
# shell: bash | ||
|
||
- name: Discord notification | ||
if: ${{ success() && inputs.push == 'true' }} | ||
env: | ||
DISCORD_WEBHOOK: ${{ inputs.discord-webhook }} | ||
uses: 'Ilshidur/[email protected]' | ||
with: | ||
args: 'Successfully pushed the following image tags to registry: ${{ env.TAGS }}' |
Oops, something went wrong.