Compare commits

...
Author SHA1 Message Date
james.maes 06dec906bf Add .circleci/config.yml 2026-04-16 15:14:36 -05:00
+20 -48
View File
@@ -1,59 +1,31 @@
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/reference/configuration-reference
version: 2.1
orbs:
node: circleci/node@6.1.0
# Define a job to be invoked later in a workflow.
# See: https://circleci.com/docs/guides/orchestrate/jobs-steps/#jobs-overview & https://circleci.com/docs/reference/configuration-reference/#jobs
jobs:
test:
say-hello:
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub.
# See: https://circleci.com/docs/guides/execution-managed/executor-intro/ & https://circleci.com/docs/reference/configuration-reference/#executor-job
docker:
- image: cimg/node:20.11
steps:
- checkout
- node/install-packages:
pkg-manager: npm
- run:
name: Type check
command: npx tsc --noEmit --skipLibCheck
- run:
name: Run tests
command: npm test
- run:
name: Build
command: npm run build
- persist_to_workspace:
root: .
paths:
- main.js
- manifest.json
- styles.css
# Specify the version you desire here
# See: https://circleci.com/developer/images/image/cimg/base
- image: cimg/base:current
publish:
docker:
- image: cimg/node:20.11
# Add steps to the job
# See: https://circleci.com/docs/guides/orchestrate/jobs-steps/#steps-overview & https://circleci.com/docs/reference/configuration-reference/#steps
steps:
# Checkout the code as the first step.
- checkout
- attach_workspace:
at: .
- run:
name: Create release
command: |
VERSION=$(node -p "require('./manifest.json').version")
npx gh-release --assets main.js,manifest.json,styles.css --tag "$VERSION" --title "v$VERSION" || true
name: "Say hello"
command: "echo Hello, World!"
# Orchestrate jobs using workflows
# See: https://circleci.com/docs/guides/orchestrate/workflows/ & https://circleci.com/docs/reference/configuration-reference/#workflows
workflows:
test_all:
say-hello-workflow: # This is the name of the workflow, feel free to change it to better match your workflow.
# Inside the workflow, you define the jobs you want to run.
jobs:
- test
publish_release:
jobs:
- test:
filters:
branches:
only: main
- publish:
requires:
- test
filters:
branches:
only: main
- say-hello