diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 00000000..0aa7ba88 --- /dev/null +++ b/.github/workflows/actions.yml @@ -0,0 +1,17 @@ +name: CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: Install + run: yarn install + - name: Build + run: yarn build + - name: Test + run: yarn test \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..d24c01c2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 10.15.0 + - run: | + yarn install + yarn build + yarn test + publish-gpr: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + registry-url: https://npm.pkg.github.com/ + scope: '@XYOracleNetwork' + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/package.json b/package.json index 1a77e2b9..fe858077 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@xyo-network/sdk-core-nodejs", + "name": "sdk-core-nodejs", "version": "0.70.11", "description": "A workspace to aggregated nodejs XYO projects", "main": "dist/index.js", @@ -11,6 +11,9 @@ "test": "yarn build && yarn lint && yarn licensecheck && export NODE_ENV=test && jest --no-cache --forceExit --coverage --verbose false --detectOpenHandles", "start:tcp": "yarn build && node --nolazy -r ts-node/register examples/tcp-server/index.ts" }, + "publishConfig": { + "registry": "https://npm.pkg.github.com/@XYOracleNetwork" + }, "devDependencies": { "@types/elliptic": "^6.4.8", "@types/jest": "^24.0.13",