From 264076fe0eb98d8cc0b03457d937ff60f3d6d87e Mon Sep 17 00:00:00 2001 From: Zdravko Kolev Date: Fri, 9 Apr 2021 13:49:42 +0300 Subject: [PATCH] Add github actions ci and publish --- .github/workflows/npm-ci.yml | 28 ++++++++++++++++++++++++++++ .github/workflows/npm-publish.yml | 28 ++++++++++++++++++++++++++++ .travis.yml | 23 ----------------------- 3 files changed, 56 insertions(+), 23 deletions(-) create mode 100644 .github/workflows/npm-ci.yml create mode 100644 .github/workflows/npm-publish.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/npm-ci.yml b/.github/workflows/npm-ci.yml new file mode 100644 index 0000000..609b792 --- /dev/null +++ b/.github/workflows/npm-ci.yml @@ -0,0 +1,28 @@ +# 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 CI + +on: + push: + branches: [ master, zkolev/use-ga ] + pull_request: + branches: [ master, zkolev/use-ga ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..0afa9c0 --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,28 @@ +# 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 Deploy + +on: + release: + types: [created] + +jobs: + 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: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV + - run: echo ${VERSION} + - run: npm ci + - run: npm run build + - run: if [[ ${VERSION} == *"alpha"* || ${VERSION} == *"beta"* || ${VERSION} == *"rc"* ]]; then echo "NPM_TAG=next"; else echo "NPM_TAG=latest"; fi >> $GITHUB_ENV + - run: echo ${NPM_TAG} + - run: npm version ${VERSION} --no-git-tag-version --save --verbose + - run: npm publish --tag ${NPM_TAG} + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 66c813f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: node_js -node_js: -- '8' - -script: -- npm run build - -before_deploy: -# update package versions -- npm version "${TRAVIS_TAG}" --no-git-tag-version --save -- if [[ "${TRAVIS_TAG}" == *"beta"* ]]; then export NPM_TAG="next"; else export NPM_TAG="latest"; fi - -deploy: - provider: npm - tag: "${NPM_TAG}" - skip_cleanup: true - email: igniteui@infragistics.com - api_key: - secure: bGiZLqENfDIABsfpEa0BoXn4WK5HSRGFTvy94JZyMkrHssveVdnpgqhgsDPnc4UVg/fQGTiEflr1j+5sCP7u6w19gSeLRmXfehwXpBndB+a8RfClLesavrydrQwsVia2/aJs6RlZ4pobzipfaPJlZksfKFb4eVbNdj3Y4OX24MsUexlrxpdINGaMG5tY8FiuAPAJJoXhHFudV7ZpRnzAysdVY+RGPji4a89uNBw5nl63NwFa9QctUdlA9Mw6RPNfIMQO97PRUsYEz0Q+PXGVRg2bU4ChhXCJu/eCIFzhX2npeGBR0ebsnCBPjbFpgvYw/cFdCvEd2oKRVLRosbiBT/4YMZvu0EzTOGXJzvbiPBiB1uAeJ+ismrpM6Mf6ZiQMhTLxTzEqgBVwCm6+My9NFeOVglZqNixyI5c2CEkuL1gvO25C3BgDDDwG89+hLpBOWLghGBvNOx6/kIWmtfhoBw5KrfoybiTLqJQf80FG35zCvV/tsFj1zk9qMahdmfVuT+FWpjjwe/54Y5i9MvPiICuwGwJxdHzk36LijxYrj28QftIO8cgk8ux71McX44x0z2Tch/qNBmQ1zmBCaMWmJgBgKP6qRyiOkJGm9+fxTldTm1EiFM6FD/tQcgfVG5Tkp36+4+LdgaMxJ5SIpkaNJbm06vgPjamQQ3DX8Da5cLQ= - on: - tags: true - repo: IgniteUI/typedoc-plugin-localization - branch: master