filo_caspar/.circleci/config.yml

38 lines
1.4 KiB
YAML
Raw Normal View History

2017-11-05 11:52:36 +00:00
version: 2
jobs:
build:
docker:
2017-12-03 11:34:43 +00:00
- image: circleci/node:latest
2020-12-08 11:09:46 +00:00
working_directory: ~/app
2017-11-05 11:52:36 +00:00
steps:
- checkout
- run:
2020-12-08 11:09:46 +00:00
name: Install npm deployment app
2020-12-08 12:34:33 +00:00
command: sudo npm install -g github-release-cli @babel/runtime
2020-12-08 11:09:46 +00:00
- run:
name: Build client javascript
command: |
npm install
npm run build
2017-12-03 11:34:43 +00:00
- deploy:
2020-12-08 11:09:46 +00:00
name: Create a release
2017-11-05 11:52:36 +00:00
command: |
2020-12-08 11:09:46 +00:00
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g')
echo "Packaging to ${CIRCLE_PROJECT_REPONAME}_build-sc.zip"
zip "${CIRCLE_PROJECT_REPONAME}_build-sc.zip" index.mjs package.json public/* api/**/* api/*
echo "Creating release '${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}'"
github-release upload \
--commitish $CIRCLE_SHA1 \
--token $GITHUB_TOKEN \
--owner $CIRCLE_PROJECT_USERNAME \
--repo $CIRCLE_PROJECT_REPONAME \
--tag "v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}" \
--name "v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM}" \
--body "Automatic CircleCI Build of v${PACKAGE_VERSION}.${CIRCLE_BUILD_NUM} from ${CIRCLE_SHA1}" \
caspar_sup-sc.zip
2017-11-05 11:52:36 +00:00
workflows:
version: 2
build_deploy:
jobs:
- build:
context: github-thething