Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Coobaha committed Mar 13, 2021
1 parent 9d14c8d commit 83e05ae
Show file tree
Hide file tree
Showing 78 changed files with 20,992 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
pull_request:
name: ci
jobs:
node:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
!anki/**/*
.github/**/*
- uses: actions/setup-node@v2
if: env.GIT_DIFF
with:
node-version: 15
- run: yarn install
if: env.GIT_DIFF
- run: yarn lage test
if: env.GIT_DIFF
- run: yarn lage build
if: env.GIT_DIFF

anki-plugin:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./anki
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
anki/**/*
.github/**/*
- uses: actions/setup-python@v2
if: env.GIT_DIFF
with:
python-version: 3.9
- name: Install Dependencies
if: env.GIT_DIFF
run: |
python -m pip install --upgrade mypy aqt pipenv pyqt5 pyqt5-stubs wheel
- name: mypy
if: env.GIT_DIFF
run: mypy .
- name: package
if: env.GIT_DIFF
run: ./package.sh
90 changes: 90 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# https://github.com/GoogleCloudPlatform/release-please-action
on:
push:
branches:
- main
name: release-please
jobs:
release-please-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- id: release-pr
uses: GoogleCloudPlatform/release-please-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: python
package-name: CoobaMeFinnish
command: release-pr
path: anki/
default-branch: main
- id: label
if: ${{ steps.release-pr.outputs.pr }}
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
await github.issues.addLabels({
owner,
repo,
issue_number: ${{steps.release-pr.outputs.pr}},
labels: ['autorelease: pending']
});
console.log(`Tagged ${{steps.release-pr.outputs.pr}}`)
release-please-release:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: python
package-name: CoobaMeFinnish
command: github-release
path: anki/
default-branch: main

- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-python@v2
if: ${{ steps.release.outputs.release_created }}
with:
python-version: 3.9
- name: Build
if: ${{ steps.release.outputs.release_created }}
run: |
cd anki
python -m pip install --upgrade mypy aqt pipenv pyqt5 pyqt5-stubs wheel
mypy .
./package.sh
- name: Upload
uses: softprops/action-gh-release@v1
if: ${{ steps.release.outputs.release_created }}
with:
files: anki/CoobaMeFinnish.zip
tag_name: ${{ steps.release.outputs.tag_name }}
name: CoobaMeFinnish ${{ steps.release.outputs.tag_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/github-script@v3
if: ${{ steps.release.outputs.release_created }}
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
await github.issues.addLabels({
owner,
repo,
issue_number: ${{steps.release.outputs.pr}},
labels: ['autorelease: published']
});
github.issues.removeLabel({
owner,
repo,
issue_number: ${{steps.release.outputs.pr}},
name: 'autorelease: tagged',
});
console.log(`Tagged ${{steps.release.outputs.pr}}`)
61 changes: 61 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# 0x
profile-*

# mac files
.DS_Store

# vim swap files
*.swp

# webstorm
.idea

# vscode
.vscode
*code-workspace



# compiled app
dist
scripts/

ecosystem.config.js
37 changes: 37 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"printWidth": 80,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["./web", "."],
"svelteSortOrder": "scripts-markup-styles",
"svelteStrictMode": true,
"svelteBracketNewLine": true,
"svelteAllowShorthand": true,
"svelteIndentScriptAndStyle": true,
"overrides": [
{
"files": ["*.js", "*.jsx", "*.ts", "*.tsx", "*.svelte"],
"options": {
"singleQuote": true,
"trailingComma": "all"
}
},
{
"files": ["*.css"],
"options": {
"singleQuote": true
}
},
{
"files": "*.json",
"options": {
"parser": "json"
}
},
{
"files": "*.md",
"options": {
"proseWrap": "always"
}
}
]
}
Loading

0 comments on commit 83e05ae

Please sign in to comment.