Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
Merge pull request #23 from cm-dyoshikawa/publish
Browse files Browse the repository at this point in the history
npm publish
  • Loading branch information
cm-dyoshikawa authored Jan 17, 2022
2 parents bee2279 + 9ad9499 commit 87d36c9
Show file tree
Hide file tree
Showing 13 changed files with 129 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- run: npm ci

- run: npm run build -w niseliff-sdk
- run: npm run build -w packages/niseliff-sdk

- run: npm run check

Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
on:
push:
branches:
- main
tags:
- 'v*'

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Setup vars
id: vars
run: echo "::set-output name=version::${GITHUB_REF##*/v}"

- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 16
cache: npm
registry-url: https://registry.npmjs.org

- run: npm i -g npm@8

- run: npm ci

- run: npm run build -w niseliff-sdk
- run: npm run build -w packages/niseliff-sdk

- run: npm run check

Expand All @@ -35,6 +40,10 @@ jobs:
with:
context: .
push: true
tags: dyoshikawa/niseline:latest,dyoshikawa/niseline:${{ github.sha }}
tags: dyoshikawa/niseline:latest,dyoshikawa/niseline:${{ steps.vars.outputs.version }}
cache-from: type=gha
cache-to: type=gha,mode=max

- run: npm publish --access public -w packages/niseliff-sdk
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
37 changes: 19 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"prepare": "husky install",
"postinstall": "npm run prepare",
"check": "npm run lint:secret && npm run format:check && npm run lint:js --workspaces && npm run typec --workspaces",
"start:client": "npm run build -w niseliff-sdk && npm run start -w sample-client-app",
"start:client": "npm run build -w packages/niseliff-sdk && npm run start -w sample-client-app",
"start:server": "npm run start -w server"
},
"devDependencies": {
Expand Down
21 changes: 21 additions & 0 deletions packages/e2e/LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022-2022, dyoshikawa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 6 additions & 0 deletions packages/niseliff-sdk/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
.eslintrc.json
.eslintignore
tsconfig.json
.eslintcache
src
21 changes: 21 additions & 0 deletions packages/niseliff-sdk/LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022-2022, dyoshikawa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
4 changes: 2 additions & 2 deletions packages/niseliff-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "niseliff-sdk",
"version": "0.0.0",
"name": "@niseline/niseliff",
"version": "0.1.0",
"private": false,
"main": "dist/index.js",
"dependencies": {
Expand Down
21 changes: 21 additions & 0 deletions packages/sample-client-app/LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022-2022, dyoshikawa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion packages/sample-client-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build": "vite build"
},
"dependencies": {
"niseliff-sdk": "file:packages/niseliff-sdk",
"@niseline/niseliff": "file:packages/niseliff-sdk",
"react": "17.0.2",
"react-dom": "17.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/sample-client-app/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { buildClientSdk } from 'niseliff-sdk'
import { buildClientSdk } from '@niseline/niseliff'
import React from 'react'
import ReactDOM from 'react-dom'

Expand Down
21 changes: 21 additions & 0 deletions packages/server/LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022-2022, dyoshikawa

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "server",
"version": "0.0.0",
"version": "0.1.0",
"description": "",
"private": true,
"scripts": {
Expand Down

0 comments on commit 87d36c9

Please sign in to comment.