Skip to content

Commit

Permalink
add github action file for npm package
Browse files Browse the repository at this point in the history
  • Loading branch information
pelikhan committed Jun 7, 2023
1 parent 83f1bad commit bec68be
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion cli/src/init.ts
Expand Up @@ -69,6 +69,25 @@ const npmFiles: FileSet = {
keywords: ["devicescript"],
},
"src/index.ts": `${IMPORT_PREFIX}\n\n`,
".github/workflows/build.yml": `name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npm test
`,
}

const settingsFiles: FileSet = {
Expand Down Expand Up @@ -235,7 +254,8 @@ nodeLinker: node-modules`,
"devsconfig.json": {},
"package.json": {
version: "0.0.0",
private: "Please use 'npm run devicescript add npm' to make this a publishable package",
private:
"Please use 'yarn devs add npm' to make this a publishable package",
dependencies: {},
devDependencies: {
"@devicescript/cli": "latest",
Expand Down

0 comments on commit bec68be

Please sign in to comment.