diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 20764cf..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,70 +0,0 @@ -version: 2 -jobs: - build: - docker: - - image: circleci/node:10 - - working_directory: ~/workspace - - steps: - - checkout - - - restore_cache: - keys: - - v1-dependencies-{{ checksum "package.json" }} - - - run: npm install - # - run: npm run lint - - run: npm run test - - run: npm run build - - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - publish: - docker: - - image: circleci/node:10 - - steps: - - add_ssh_keys - - checkout - - - run: - name: Authorize NPM - command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc - - - restore_cache: - keys: - - v1-dependencies-{{ checksum "package.json" }} - - - run: npm install - # - run: npm run lint - - run: npm run test - - run: npm run build - - - run: - name: Publish to NPM - command: npm publish - -workflows: - version: 2 - main: - jobs: - - build: - context: org-global - filters: - branches: - only: master - tags: - only: /v.*/ - - publish: - context: org-global - requires: - - build - filters: - branches: - ignore: /.*/ - tags: - only: /v.*/ \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..703918f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,40 @@ +name: svelte-formly + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + + - uses: actions/checkout@v1 + + - name: Restore cache + uses: actions/cache@v1 + with: + path: node_modules + key: ${{ runner.OS }}-npm + restore-keys: | + ${{ runner.OS }}-npm + + - name: Setup NodeJS + uses: actions/setup-node@v1 + with: + node-version: '10.x' + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Test + run: npm run test + + - name: Publish to npm + uses: pascalgn/npm-publish-action@1.1.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file