This commit is contained in:
TheThing 2021-12-02 11:01:49 +00:00
commit 95392c80b2
3 changed files with 8 additions and 5 deletions

View file

@ -8,7 +8,7 @@ jobs:
- checkout - checkout
- run: - run:
name: Install npm deployment app name: Install npm deployment app
command: sudo npm install -g github-release-cli command: sudo npm install -g github-release-cli @babel/runtime
- run: - run:
name: Check if this is a new release name: Check if this is a new release
command: | command: |
@ -30,6 +30,7 @@ jobs:
PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[", ]//g') 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" echo "Packaging to ${CIRCLE_PROJECT_REPONAME}_build-sc.zip"
zip "${CIRCLE_PROJECT_REPONAME}_build-sc-core.zip" runner.mjs package.json service/* core/**/* core/* zip "${CIRCLE_PROJECT_REPONAME}_build-sc-core.zip" runner.mjs package.json service/* core/**/* core/*
zip "${CIRCLE_PROJECT_REPONAME}_app.zip" runner.mjs package.json service/* core/**/* core/* service/* config.json install.bat npminstall.bat README.md start.bat stop.bat uninstall.bat
echo "Creating release '${PACKAGE_VERSION}'" echo "Creating release '${PACKAGE_VERSION}'"
github-release upload \ github-release upload \
--commitish $CIRCLE_SHA1 \ --commitish $CIRCLE_SHA1 \
@ -37,13 +38,13 @@ jobs:
--owner $CIRCLE_PROJECT_USERNAME \ --owner $CIRCLE_PROJECT_USERNAME \
--repo $CIRCLE_PROJECT_REPONAME \ --repo $CIRCLE_PROJECT_REPONAME \
--tag "v${PACKAGE_VERSION}" \ --tag "v${PACKAGE_VERSION}" \
--name "v${PACKAGE_VERSION}" \ --release-name "v${PACKAGE_VERSION}" \
--body "Automatic CircleCI Build of v${PACKAGE_VERSION} from ${CIRCLE_SHA1}: ${COMMIT_MESSAGE}" \ --body "Automatic CircleCI Build of v${PACKAGE_VERSION} from ${CIRCLE_SHA1}: ${COMMIT_MESSAGE}" \
"${CIRCLE_PROJECT_REPONAME}_build-sc-core.zip" "${CIRCLE_PROJECT_REPONAME}_build-sc-core.zip" "${CIRCLE_PROJECT_REPONAME}_app.zip"
workflows: workflows:
version: 2 version: 2
build_deploy: build_deploy:
jobs: jobs:
- build: - build:
context: github-thething context: github-thething

2
npminstall.bat Normal file
View file

@ -0,0 +1,2 @@
npm install
PAUSE

View file

@ -1,6 +1,6 @@
{ {
"name": "service-core", "name": "service-core",
"version": "2.0.1", "version": "2.0.2",
"description": "Core boiler plate code to install node server as windows service", "description": "Core boiler plate code to install node server as windows service",
"main": "lib.mjs", "main": "lib.mjs",
"scripts": { "scripts": {