From b77a5dfaadae254d28a5d4318cf08fcc5c45a69d Mon Sep 17 00:00:00 2001 From: Olyno Date: Sun, 24 Nov 2019 23:54:45 +0100 Subject: [PATCH 1/2] [enhancement] - Switch from CircleCI to Github Action --- .circleci/config.yml | 70 ---------------------------------------- .github/workflows/ci.yml | 44 +++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 70 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/ci.yml 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..33a741c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,44 @@ +name: svelte-formly + +on: [push] + +jobs: + build: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + + - uses: actions/checkout@v1 + + - name: Restore cache + uses: actions/cache@v1 + with: + path: node_modules + key: ${{ runner.OS }}-yarn + restore-keys: | + ${{ runner.OS }}-yarn + + - name: Setup NodeJS + uses: actions/setup-node@v1 + with: + node-version: '10.x' + + - name: Install dependencies + run: yarn install + + - name: Build + run: yarn build + + - name: Test + run: yarn 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 From 366ec2a3b2b86df69f699db8b37572acae3c4e48 Mon Sep 17 00:00:00 2001 From: Olyno Date: Mon, 25 Nov 2019 00:21:38 +0100 Subject: [PATCH 2/2] [enhancement] - Switch from Yarn to NPM and use only ubuntu to make tests --- .github/workflows/ci.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33a741c..703918f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,11 +5,7 @@ on: [push] jobs: build: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ubuntu-latest steps: @@ -19,9 +15,9 @@ jobs: uses: actions/cache@v1 with: path: node_modules - key: ${{ runner.OS }}-yarn + key: ${{ runner.OS }}-npm restore-keys: | - ${{ runner.OS }}-yarn + ${{ runner.OS }}-npm - name: Setup NodeJS uses: actions/setup-node@v1 @@ -29,13 +25,13 @@ jobs: node-version: '10.x' - name: Install dependencies - run: yarn install + run: npm install - name: Build - run: yarn build + run: npm run build - name: Test - run: yarn test + run: npm run test - name: Publish to npm uses: pascalgn/npm-publish-action@1.1.0