Skip to content

Commit b46d21a

Browse files
committed
feat(git): Config github action.
1 parent e17edd8 commit b46d21a

File tree

7 files changed

+269
-0
lines changed

7 files changed

+269
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Bug Report
2+
description: Fire a bug report
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: What did you expect to happen?
15+
placeholder: Tell us what you see!
16+
validations:
17+
required: true
18+
- type: dropdown
19+
id: os
20+
attributes:
21+
label: What OS are you using?
22+
multiple: true
23+
options:
24+
- Windows
25+
- Linux
26+
- macOS
27+
- iOS (iPhone, iPad)
28+
- Android
29+
validations:
30+
required: true
31+
- type: dropdown
32+
id: service
33+
attributes:
34+
label: What remote cloud services are you using?
35+
multiple: true
36+
options:
37+
- S3
38+
- OneDrive for personal
39+
- Dropbox
40+
- webdav
41+
- others
42+
validations:
43+
required: true
44+
- type: input
45+
id: version-plugin
46+
attributes:
47+
label: Version of the plugin
48+
description: What version of the plugin are you running?
49+
validations:
50+
required: false
51+
- type: input
52+
id: version-obsidian
53+
attributes:
54+
label: Version of Obsidian
55+
description: What version of Obsidian are you running?
56+
validations:
57+
required: false
58+
- type: checkboxes
59+
id: using-password
60+
attributes:
61+
label: Using password or not
62+
description: Are you using password (end-to-end encryption) or not?
63+
options:
64+
- label: Yes.
65+
required: false
66+
- type: checkboxes
67+
id: ensure-no-sensitive-information
68+
attributes:
69+
label: Ensure no sensitive information
70+
description: By submitting this issue, you ensure that no sensitive information is submitted in the issue.
71+
options:
72+
- label: I ensure that no sensitive information is submitted in the issue.
73+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Feature Request
2+
description: Some idea about new features
3+
title: "[Feature Request]: "
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
- type: textarea
11+
id: what-are-you-expecting
12+
attributes:
13+
label: What feature are you suggesting?
14+
description: What feature are you suggesting?
15+
validations:
16+
required: true
17+
- type: dropdown
18+
id: service
19+
attributes:
20+
label: What remote cloud services are you using, or suggesting adding the feature to?
21+
multiple: true
22+
options:
23+
- S3
24+
- OneDrive for personal
25+
- Dropbox
26+
- webdav
27+
- others
28+
validations:
29+
required: false
30+
- type: checkboxes
31+
id: ensure-no-sensitive-information
32+
attributes:
33+
label: Ensure no sensitive information
34+
description: By submitting this issue, you ensure that no sensitive information is submitted in the issue.
35+
options:
36+
- label: I ensure that no sensitive information is submitted in the issue.
37+
required: true

.github/workflows/auto-build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
3+
4+
name: BuildCI
5+
6+
on:
7+
push:
8+
branches: ["**"]
9+
pull_request:
10+
branches: [master]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
environment: env-for-buildci
17+
18+
env:
19+
DROPBOX_APP_KEY: ${{secrets.DROPBOX_APP_KEY}}
20+
ONEDRIVE_CLIENT_ID: ${{secrets.ONEDRIVE_CLIENT_ID}}
21+
ONEDRIVE_AUTHORITY: ${{secrets.ONEDRIVE_AUTHORITY}}
22+
23+
strategy:
24+
matrix:
25+
node-version: [16.x]
26+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
27+
28+
steps:
29+
- name: Checkout codes
30+
uses: actions/checkout@v2
31+
with:
32+
lfs: true
33+
submodules: recursive
34+
- name: Checkout LFS
35+
run: git lfs checkout
36+
- name: Use Node.js ${{ matrix.node-version }}
37+
uses: actions/setup-node@v2
38+
with:
39+
node-version: ${{ matrix.node-version }}
40+
- run: npm install
41+
- run: npm test
42+
- run: npm run build2
43+
- uses: actions/upload-artifact@v2
44+
with:
45+
name: my-dist
46+
path: |
47+
main.js
48+
manifest.json
49+
styles.css

.github/workflows/release.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# modified from https://github.com/argenos/nldates-obsidian/blob/master/.github/workflows/release.yml
2+
# which is released under MIT License
3+
4+
# trigger:
5+
# modify manifest.json, package.json, versions.json
6+
# git tag <version number>
7+
# git push origin --tags
8+
9+
name: Release A New Version
10+
11+
on:
12+
push:
13+
tags:
14+
- "*" # Push events to matching any tag format, i.e. 1.0, 20.15.10
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
20+
environment: env-for-buildci
21+
22+
env:
23+
DROPBOX_APP_KEY: ${{secrets.DROPBOX_APP_KEY}}
24+
ONEDRIVE_CLIENT_ID: ${{secrets.ONEDRIVE_CLIENT_ID}}
25+
ONEDRIVE_AUTHORITY: ${{secrets.ONEDRIVE_AUTHORITY}}
26+
27+
strategy:
28+
matrix:
29+
node-version: [16.x]
30+
31+
steps:
32+
- name: Checkout codes
33+
uses: actions/checkout@v2
34+
with:
35+
lfs: true
36+
submodules: recursive
37+
- name: Checkout LFS
38+
run: git lfs checkout
39+
- name: Use Node.js ${{ matrix.node-version }}
40+
uses: actions/setup-node@v2
41+
with:
42+
node-version: ${{ matrix.node-version }}
43+
- run: npm install
44+
- run: npm test
45+
- run: npm run build2
46+
- name: Create Release
47+
id: create_release
48+
uses: actions/create-release@v1
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
VERSION: ${{ github.ref }}
52+
with:
53+
tag_name: ${{ github.ref }}
54+
release_name: ${{ github.ref }}
55+
draft: false
56+
prerelease: true
57+
- name: Upload main.js
58+
id: upload-main
59+
uses: actions/upload-release-asset@v1
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
with:
63+
upload_url: ${{ steps.create_release.outputs.upload_url }}
64+
asset_path: ./main.js
65+
asset_name: main.js
66+
asset_content_type: text/javascript
67+
- name: Upload manifest.json
68+
id: upload-manifest
69+
uses: actions/upload-release-asset@v1
70+
env:
71+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
72+
with:
73+
upload_url: ${{ steps.create_release.outputs.upload_url }}
74+
asset_path: ./manifest.json
75+
asset_name: manifest.json
76+
asset_content_type: application/json
77+
- name: Upload styles.css
78+
id: upload-styles
79+
uses: actions/upload-release-asset@v1
80+
env:
81+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
82+
with:
83+
upload_url: ${{ steps.create_release.outputs.upload_url }}
84+
asset_path: ./styles.css
85+
asset_name: styles.css
86+
asset_content_type: text/css

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Intellij
2+
*.iml
3+
.idea
4+
5+
# npm
6+
node_modules
7+
package-lock.json
8+
9+
# build
10+
main.js
11+
*.js.map
12+
13+
# obsidian
14+
data.json
15+
16+
# debug
17+
logs.txt
18+
19+
# hidden files
20+
.

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
main.js
3+
data.json

0 commit comments

Comments
 (0)