From ea91797a018cf523a47b4b3595740219db3d2a0b Mon Sep 17 00:00:00 2001 From: Nikolaev Tomov Date: Fri, 12 Mar 2021 10:36:09 +0000 Subject: [PATCH 1/3] Remove travis file --- .travis.yml | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 0bbdb87..0000000 --- a/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -sudo: false - -language: node_js - -install: - - npm ci - -script: - - npm test From 74990f78fa2f3cf4a893a3f788a568220d43ffcf Mon Sep 17 00:00:00 2001 From: Nikolaev Tomov Date: Fri, 12 Mar 2021 10:38:13 +0000 Subject: [PATCH 2/3] Create npm-publish.yml --- .github/workflows/npm-publish.yml | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..861e372 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,47 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} + + publish-gpr: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://npm.pkg.github.com/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} From 9496fe897e3a7ee1b2ac036fc1c872a9c9fb6d25 Mon Sep 17 00:00:00 2001 From: Nikolaev Tomov Date: Fri, 12 Mar 2021 10:51:13 +0000 Subject: [PATCH 3/3] Update github workflows --- .github/workflows/ci.yml | 22 +++++++++++++++ .github/workflows/npm-publish.yml | 47 ------------------------------- 2 files changed, 22 insertions(+), 47 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..77374bd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI +on: [pull_request] + +env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} + - uses: actions/setup-node@v1 + with: + node-version: '12' + - name: Install dependencies + run: npm ci + - name: Run tests + run: npm test diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 861e372..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,47 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages - -name: Node.js Package - -on: - release: - types: [created] - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 12 - - run: npm ci - - run: npm test - - publish-npm: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://registry.npmjs.org/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} - - publish-gpr: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - with: - node-version: 12 - registry-url: https://npm.pkg.github.com/ - - run: npm ci - - run: npm publish - env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}