From 581f70f8af84208601814f2a50c22920e8abb6cd Mon Sep 17 00:00:00 2001 From: Owen Smith Date: Wed, 14 Aug 2024 09:43:58 -0400 Subject: [PATCH] build: gha (#190) --- .github/workflows/build.yaml | 50 ++++++++++++++++++++++++++++++++++++ .travis.yml | 19 -------------- package.json | 6 ++--- 3 files changed, 52 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/build.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..5c9c816 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,50 @@ +name: build + +on: + push: + branches: + - master + tags: + - v* + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 20 + strategy: + fail-fast: false + matrix: + node: [8, 10, 12, 14, 16, 18, 20, 22] + steps: + - uses: Brightspace/third-party-actions@actions/checkout + + - uses: Brightspace/third-party-actions@actions/setup-node + with: + node-version: ${{ matrix.node }} + + - run: npm install + - run: npm test + + publish: + if: github.ref_type == 'tag' + needs: test + + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + contents: read + id-token: write + steps: + - uses: Brightspace/third-party-actions@actions/checkout + + - uses: Brightspace/third-party-actions@actions/setup-node + with: + node-version: 22 + registry-url: 'https://registry.npmjs.org' + + - run: npm install + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6aecad8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -sudo: false -language: node_js -node_js: - - 8 - - 10 - - 11 - - 12 -after_success: npm run report-cov -deploy: - provider: npm - email: d2ltravisdeploy@d2l.com - api_key: - # d2l-travis-deploy: 94d3......8807 - secure: G85ice0iqGW3Z3ZKYUmqwXROEZP34TLFrP1L4bdVdEZd5RLTH7WydSd2SQBKNVqWkhxSKSIvigt8Ww8mUoNP7PBKpS7av3sGDH0FtOyLfp73aXnRikT/dvozvneyU4W10Rgty3O2JRtZ+B8PR2EbktOUgorVjMZTmXOck7GgCUXDxCVUurRX6scNrvO5chJU6nTWdH36WGMbuKdkfueGFSkiU4+AU03ZlCkJWDh2NNxR/Sg5Hstv6jKPomf9YHO6ZYQAZ3qlrPJjs2mkpVNBafqmpgGMxceR/apFNP/PLQ8BLu0hw1aKetJZvjSyhlT17Lurv918QL4pdTvo8WKzkRPGz1ZTWN26LH6vc5d67RULFenNgdlXDvfJe3POJqnrkj8G1TSOUyiCyGsAICNRKAuzMECrYEhh/55jO2X9qn6TR3LUJtQPK6f5eneMEBib38AFwFxEyRq8zZyCt/oZI7vys1FkOIHoOjDy2NgmyQjbfa6LjteJYX5LAlXn1AHUoO3VntXlz3PBms/3+rZEan63GTdsY6crEZ543ou2vsDhAGsy6ALn9oL/iF6KVQKPFDlMcQ55hjvyd+q/gcZgBh5LtiEZX9RbC6rYpDUTC0Zs57QeW1ODELxPfIQHihMZGKxG4NBFMUR9aV0tZqVrOHB6dFpEIARESfCTTTu90Ag= - on: - all_branches: true - tags: true - repo: Brightspace/node-jwk-to-pem - node: 12 diff --git a/package.json b/package.json index 5526194..5d3f388 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,11 @@ "scripts": { "check-style": "eslint .", "pretest": "npm run check-style", - "test": "nyc --all --include src -- mocha spec", - "report-cov": "nyc report --reporter=text-lcov | coveralls" + "test": "nyc --all --include src --reporter=text-summary -- mocha spec" }, "repository": { "type": "git", - "url": "git+ssh://git@github.com/Brightspace/node-jwk-to-pem.git" + "url": "git+https://github.com/Brightspace/node-jwk-to-pem" }, "keywords": [ "jwt", @@ -37,7 +36,6 @@ }, "devDependencies": { "chai": "^4.2.0", - "coveralls": "^3.0.5", "eslint": "^6.0.1", "eslint-config-brightspace": "^0.6.4", "jwa": "^1.1.4",