Skip to content

Commit

Permalink
feat: ci for publish and test
Browse files Browse the repository at this point in the history
  • Loading branch information
fedeya committed Mar 3, 2023
1 parent e2f047d commit da9e055
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Package to npm
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Node.js CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- run: yarn build
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
config.gypi
CVS
npm-debug.log
/examples
/examples
.github
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ export default async function Page() {

👤 **Fedeya <[email protected]>**

- Website: https://fedeya.tk
- Twitter: [@fede_minaya](https://twitter.com/fede_minaya)
- Website: [fedeminaya.com](https://fedeminaya.com)
- Twitter: [@fedeminaya](https://twitter.com/fedeminaya)
- Github: [@Fedeya](https://github.com/Fedeya)
- LinkedIn: [@federico-minaya](https://linkedin.com/in/federico-minaya)

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@
"devDependencies": {
"@types/lru-cache": "^5.1.0",
"@types/node": "^14.14.41",
"typescript": "^4.2.4"
"typescript": "^4.2.4",
"@sanity/client": "^5.2.2",
"next-auth": "^4.19.2"
},
"dependencies": {
"@sanity/uuid": "^3.0.1",
Expand Down

0 comments on commit da9e055

Please sign in to comment.