From d63ef8d63411716d2d048730e95c746cd252fe5d Mon Sep 17 00:00:00 2001 From: pllearns Date: Mon, 9 Dec 2019 15:12:34 -0800 Subject: [PATCH] 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",