From 0ac4e367fedde95570fcc1295d24a11e666f9460 Mon Sep 17 00:00:00 2001 From: Phillip Lorenzo Date: Tue, 3 Dec 2019 10:08:16 -0800 Subject: [PATCH 1/4] Create actions.yml --- .github/workflows/actions.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/actions.yml diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 00000000..b2340b24 --- /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: Run a one-line script + run: echo Hello, world! + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. From c5c68d85075662e9b7986857012a4fdc8a8e74d7 Mon Sep 17 00:00:00 2001 From: pllearns Date: Mon, 9 Dec 2019 15:02:04 -0800 Subject: [PATCH 2/4] add actual yarn scripts --- .github/workflows/actions.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index b2340b24..0aa7ba88 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -9,9 +9,9 @@ jobs: steps: - uses: actions/checkout@v1 - - name: Run a one-line script - run: echo Hello, world! - - name: Run a multi-line script - run: | - echo Add other actions to build, - echo test, and deploy your project. + - name: Install + run: yarn install + - name: Build + run: yarn build + - name: Test + run: yarn test \ No newline at end of file From d63ef8d63411716d2d048730e95c746cd252fe5d Mon Sep 17 00:00:00 2001 From: pllearns Date: Mon, 9 Dec 2019 15:12:34 -0800 Subject: [PATCH 3/4] prep repo for release cd --- .github/workflows/release.yml | 35 +++++++++++++++++++++++++++++++++++ package.json | 3 +++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..bc7978a8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + build: + name: Create Release + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@master + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + Changes in this release + draft: false + prerelease: false + - name: Build and Test + run: | + yarn install + yarn build + yarn test + - name: deploy + run: | + npm login --registry=https://npm.pkg.github.com/ + npm publish \ No newline at end of file diff --git a/package.json b/package.json index 1a77e2b9..dabd0375 100644 --- a/package.json +++ b/package.json @@ -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/" + }, "devDependencies": { "@types/elliptic": "^6.4.8", "@types/jest": "^24.0.13", From 830f2d490cd0922a625b85b81466ee5a46301b69 Mon Sep 17 00:00:00 2001 From: pllearns Date: Tue, 10 Dec 2019 14:22:13 -0800 Subject: [PATCH 4/4] prep release workflow for package --- .github/workflows/release.yml | 38 ++++++++++++++++------------------- package.json | 4 ++-- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc7978a8..d24c01c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,29 +7,25 @@ on: jobs: build: - name: Create Release runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@master - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: | - Changes in this release - draft: false - prerelease: false - - name: Build and Test - run: | + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: 10.15.0 + - run: | yarn install yarn build yarn test - - name: deploy - run: | - npm login --registry=https://npm.pkg.github.com/ - npm publish \ No newline at end of file + 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 dabd0375..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", @@ -12,7 +12,7 @@ "start:tcp": "yarn build && node --nolazy -r ts-node/register examples/tcp-server/index.ts" }, "publishConfig": { - "registry": "https://npm.pkg.github.com/" + "registry": "https://npm.pkg.github.com/@XYOracleNetwork" }, "devDependencies": { "@types/elliptic": "^6.4.8",