mirror of
https://github.com/DeBrosOfficial/network-ts-sdk.git
synced 2025-12-12 18:28:50 +00:00
Update package version to 0.1.0, rename package, and add npm and GitHub Packages publishing workflows
This commit is contained in:
parent
60e67c98bf
commit
03c62882fa
65
.github/workflows/publish-npm.yml
vendored
Normal file
65
.github/workflows/publish-npm.yml
vendored
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
name: Publish SDK to npm
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*' # Trigger on version tags (e.g., v0.1.0, v0.2.1)
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-npm:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '18'
|
||||||
|
registry-url: 'https://registry.npmjs.org'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
working-directory: network-ts-sdk
|
||||||
|
|
||||||
|
- name: Build SDK
|
||||||
|
run: pnpm build
|
||||||
|
working-directory: network-ts-sdk
|
||||||
|
|
||||||
|
- name: Publish to npm
|
||||||
|
run: npm publish --access public
|
||||||
|
working-directory: network-ts-sdk
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
|
publish-github:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js for GitHub Packages
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '18'
|
||||||
|
registry-url: 'https://npm.pkg.github.com'
|
||||||
|
scope: '@network'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
working-directory: network-ts-sdk
|
||||||
|
|
||||||
|
- name: Build SDK
|
||||||
|
run: pnpm build
|
||||||
|
working-directory: network-ts-sdk
|
||||||
|
|
||||||
|
- name: Publish to GitHub Packages
|
||||||
|
run: npm publish
|
||||||
|
working-directory: network-ts-sdk
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@network/network-ts-sdk",
|
"name": "network-ts-sdk",
|
||||||
"version": "0.0.2",
|
"version": "0.1.0",
|
||||||
"description": "TypeScript SDK for DeBros Network Gateway",
|
"description": "TypeScript SDK for DeBros Network Gateway",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
@ -27,7 +27,9 @@
|
|||||||
"typecheck": "tsc --noEmit",
|
"typecheck": "tsc --noEmit",
|
||||||
"lint": "eslint src tests",
|
"lint": "eslint src tests",
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
"test:e2e": "vitest run tests/e2e"
|
"test:e2e": "vitest run tests/e2e",
|
||||||
|
"release:npm": "npm publish --access public --registry=https://registry.npmjs.org/",
|
||||||
|
"release:gh": "npm publish --registry=https://npm.pkg.github.com"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"isomorphic-ws": "^5.0.0"
|
"isomorphic-ws": "^5.0.0"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user