Skip to content

Commit f5644cc

Browse files
committed
githuib actions for build/distribute
1 parent e032deb commit f5644cc

11 files changed

Lines changed: 374 additions & 0 deletions

File tree

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/custom.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Custom issue template
3+
about: Describe this issue template's purpose here.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Bug fix
3+
about: Change which fixes an issue.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
# Description
10+
11+
* Please include a summary of the change.
12+
* Please also include relevant motivation and context.
13+
* List any dependencies that are required for this change.
14+
15+
Addresses issues #(issue)
16+
17+
## Type of change
18+
19+
**NB: ~~Please strike through options that are not applicable.~~**
20+
21+
- [ ] Breaking change (fix that would cause existing functionality to not work as expected)
22+
- [ ] This change requires a documentation update
23+
24+
# Sample Input and output
25+
* Provide screenshots or videos.
26+
* Or provide Input output if run on text terminal.
27+
28+
# How Has This Been Tested?
29+
30+
* Please describe the tests that you ran to verify your changes.
31+
* Provide instructions so we can reproduce.
32+
* Please also list any relevant details for your test configuration
33+
34+
35+
- [ ] Test A
36+
- [ ] Test B
37+
38+
**Test Configuration**:
39+
* Firmware version:
40+
* Hardware:
41+
* Toolchain:
42+
* SDK:
43+
44+
# Checklist:
45+
46+
**NB: ~~Please strike through options that are not applicable.~~**
47+
48+
- [ ] My code follows the style guidelines of this project
49+
- [ ] I have performed a self-review of my own code
50+
- [ ] I have commented my code, particularly in hard-to-understand areas
51+
- [ ] I have made corresponding changes to the documentation
52+
- [ ] My changes generate no new warnings
53+
- [ ] I have added tests that prove my fix is effective or that my feature works
54+
- [ ] New and existing unit tests pass locally with my changes
55+
- [ ] Any dependent changes have been merged and published in downstream modules
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: New Feature
3+
about: Change which adds functionality
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
# Description
10+
11+
* Please include a summary of the change.
12+
* Please also include relevant motivation and context.
13+
* List any dependencies that are required for this change.
14+
15+
Fixes #(issue)
16+
17+
## Type of change
18+
**NB: ~~Please strike through options that are not applicable.~~**
19+
- [ ] non-breaking change which fixes an issue
20+
- [ ] Breaking change (feature that would cause existing functionality to not work as expected)
21+
- [ ] This change requires a documentation update
22+
23+
# Sample Input and output
24+
* Provide screenshots or videos.
25+
* Or provide code block Input output if run on text terminal as below.
26+
```
27+
$ code block Input output on text terminal.
28+
output
29+
```
30+
31+
# How Has This Been Tested?
32+
33+
* Please describe the tests that you ran to verify your changes.
34+
* Provide instructions so we can reproduce.
35+
* Please also list any relevant details for your test configuration
36+
37+
- [ ] Test A
38+
- [ ] Test B
39+
40+
**Test Configuration**:
41+
* Firmware version:
42+
* Hardware:
43+
* Toolchain:
44+
* SDK:
45+
46+
# Checklist:
47+
48+
**NB: ~~Please strike through options that are not applicable.~~**
49+
50+
- [ ] My code follows the style guidelines of this project
51+
- [ ] I have performed a self-review of my own code
52+
- [ ] I have commented my code, particularly in hard-to-understand areas
53+
- [ ] I have made corresponding changes to the documentation
54+
- [ ] My changes generate no new warnings
55+
- [ ] I have added tests that prove my fix is effective or that my feature works
56+
- [ ] New and existing unit tests pass locally with my changes
57+
- [ ] Any dependent changes have been merged and published in downstream modules
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
name: Remove Feature
3+
about: Change which removes existing functionality
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
9+
# Description
10+
11+
* Please include a summary of the change.
12+
* Please also include relevant motivation and context.
13+
* List any dependencies that are required for this change.
14+
15+
Fixes #(issue)
16+
17+
## Type of change
18+
**NB: ~~Please strike through options that are not applicable.~~**
19+
- [ ] non-breaking change which fixes an issue
20+
- [ ] Breaking change (feature that would cause existing functionality to not work as expected)
21+
- [ ] This change requires a documentation update
22+
23+
# Sample Input and output
24+
* Provide screenshots or videos.
25+
* Or provide code block Input output if run on text terminal as below.
26+
```
27+
$ code block Input output on text terminal.
28+
output
29+
```
30+
31+
# How Has This Been Tested?
32+
33+
* Please describe the tests that you ran to verify your changes.
34+
* Provide instructions so we can reproduce.
35+
* Please also list any relevant details for your test configuration
36+
37+
38+
- [ ] Test A
39+
- [ ] Test B
40+
41+
**Test Configuration**:
42+
* Firmware version:
43+
* Hardware:
44+
* Toolchain:
45+
* SDK:
46+
47+
# Checklist:
48+
49+
**NB: ~~Please strike through options that are not applicable.~~**
50+
51+
- [ ] My code follows the style guidelines of this project
52+
- [ ] I have performed a self-review of my own code
53+
- [ ] I have commented my code, particularly in hard-to-understand areas
54+
- [ ] I have made corresponding changes to the documentation
55+
- [ ] My changes generate no new warnings
56+
- [ ] I have added tests that prove my fix is effective or that my feature works
57+
- [ ] New and existing unit tests pass locally with my changes
58+
- [ ] Any dependent changes have been merged and published in downstream modules

.github/workflows/build_verify.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build verification
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
# The branches below must be a subset of the branches above
8+
branches: [ main ]
9+
10+
jobs:
11+
build-tasks:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Npm Install
16+
run: |
17+
npm install
18+
- name: building build
19+
run: |
20+
npm run build
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '24 18 * * 4'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'javascript' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37+
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38+
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v3
42+
43+
# Initializes the CodeQL tools for scanning.
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54+
# If this step fails, then you should remove it and run the build manually (see below)
55+
- name: Autobuild
56+
uses: github/codeql-action/autobuild@v1
57+
58+
# ℹ️ Command-line programs to run using the OS shell.
59+
# 📚 https://git.io/JvXDl
60+
61+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62+
# and modify them (or add more) to build your code if your project
63+
# uses a compiled language
64+
65+
#- run: |
66+
# make bootstrap
67+
# make release
68+
69+
- name: Perform CodeQL Analysis
70+
uses: github/codeql-action/analyze@v1

.github/workflows/npm-publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# When anyone pushes to npm branch in this repo, the package will be published to npm. This action requires
2+
# access to NPM_TOKEN secret. Contact core.ai admins to get access to core.ais org tokens.
3+
# To publish to your own npm account, follow this https://docs.npmjs.com/creating-and-viewing-access-tokens
4+
name: Publish package to npm
5+
6+
on:
7+
push:
8+
branches: [ npm ]
9+
10+
jobs:
11+
build-tasks:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Npm Install
16+
run: |
17+
npm install
18+
- name: building package
19+
run: |
20+
npm run build
21+
- name: Tests with coverage
22+
run: |
23+
npm run cover
24+
- name: Publishing package to npm repository
25+
run: |
26+
npm publish --access public
27+
env:
28+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}

0 commit comments

Comments
 (0)