Skip to content

Commit

Permalink
Tech 573 Move CI to Circle CI (#313)
Browse files Browse the repository at this point in the history
Move CI workflows to Circle CI
  • Loading branch information
av-rasmus authored Jan 21, 2025
1 parent d3eaea1 commit af91ff3
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 54 deletions.
74 changes: 74 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
version: 2.1
orbs:
node: circleci/[email protected]
executors:
node22:
docker:
- image: cimg/node:22.13
jobs:
lint_test_build:
executor:
name: node22
steps:
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "yarn.lock" }}
- v1-dependencies-
- node/install-yarn
- run: yarn install --frozen-lockfile
- save_cache:
paths:
- ./node_modules
key: v1-dependencies-{{ checksum "yarn.lock" }}
- run: yarn run lint
- run: yarn run coverage
- run: yarn run build
- run: yarn pack
- persist_to_workspace:
root: /home/circleci/project
paths:
- ./aion-dk-js-client-*.tgz
publish:
executor:
name: node22
steps:
- attach_workspace:
at: /tmp/workspace
- run:
name: Move files
command: |
mv /tmp/workspace/aion-dk-js-client-*.tgz ./
- run:
name: Set npm access token
command: |
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
- run:
name: Publish to NPM
command: |
package_file=$(ls aion-dk-js-client-*.tgz)
if echo "${package_file}" | grep -E "alpha|beta" > /dev/null; then
prerelease=$(echo "${package_file}" | grep -E -o "alpha|beta")
echo "Publishing prerelease with tag ${prerelease} to NPM"
npm publish ${package_file} --tag ${prerelease}
else
echo "Publishing release with to NPM"
npm publish ${package_file}
fi
workflows:
build_and_deploy:
jobs:
- lint_test_build:
filters:
branches:
only: /.*/
tags:
only: /^v.*/
- publish:
requires:
- lint_test_build
filters:
branches:
ignore: /.*/
tags:
only: /^v.*/
21 changes: 0 additions & 21 deletions .github/workflows/package.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/tests.yml

This file was deleted.

1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

0 comments on commit af91ff3

Please sign in to comment.