From ffe49eb51e73898ddcd015f18e09a811d413b2aa Mon Sep 17 00:00:00 2001 From: shanejonas Date: Wed, 19 Jun 2019 17:48:17 -0700 Subject: [PATCH] fix: circle production asset release --- .circleci/config.yml | 33 ++++++++++++++++++++++++++------- .releaserc | 36 ++++++++++++++++++++++-------------- 2 files changed, 48 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ab4dcda..5bd0f06 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,6 +40,19 @@ jobs: - run: ./node_modules/.bin/codecov - save_cache: *save-deps-cache + release: + <<: *defaults + docker: + - image: circleci/node:10 + steps: + - checkout + - restore_cache: *restore-deps-cache + - run: ls dist + - run: npm install + - run: npm install semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github @semantic-release/npm @semantic-release/commit-analyzer @semantic-release/release-notes-generator @qiwi/semantic-release-gh-pages-plugin + - run: ./node_modules/.bin/semantic-release --dry-run + - save_cache: *save-deps-cache + windowsbuild: <<: *defaults docker: @@ -51,7 +64,11 @@ jobs: command: | echo 'export APP_VERSION_GIT_TAG=$(npm run --silent version)' >> $BASH_ENV # Redirect MY_ENV_VAR into $BASH_ENV - run: npm install - - run: npm run electron:build + - run: npm run electron:build -- --win --ia32 + - persist_to_workspace: + root: ~/project/dist/ + paths: + - dist/* macbuild: <<: *defaults @@ -65,6 +82,10 @@ jobs: echo 'export APP_VERSION_GIT_TAG=$(npm run --silent version)' >> $BASH_ENV # Redirect MY_ENV_VAR into $BASH_ENV - run: npm install - run: npm run electron:build + - persist_to_workspace: + root: ~/project/dist/ + paths: + - dist/* linuxbuild: <<: *defaults @@ -78,12 +99,10 @@ jobs: echo 'export APP_VERSION_GIT_TAG=$(npm run --silent version)' >> $BASH_ENV # Redirect MY_ENV_VAR into $BASH_ENV - run: npm install - run: npm run electron:build - - release: - docker: - - image: circleci/node:10 - steps: - - run: echo "hello world" + - persist_to_workspace: + root: ~/project/dist + paths: + - dist/* workflows: version: 2 diff --git a/.releaserc b/.releaserc index f31f856..5f1238b 100644 --- a/.releaserc +++ b/.releaserc @@ -5,26 +5,34 @@ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", "@semantic-release/changelog", - "@semantic-release/github", - "@semantic-release/git", - "@semantic-release/npm" + [ + "@semantic-release/github", + { + "assets": [ + { + "path": "dist/electron-pristine-linux-x64-0.0.0-development.tar.gz", + "label": "Electron Pristine Linux distribution" + }, + { + "path": "dist/mac/*.dmg", + "label": "Electron Pristine Mac distribution" + }, + { + "path": "dist/*.exe", + "label": "Electron Pristine Windows distribution" + } + ] + } + ], + "@semantic-release/git" ], "verifyConditions": [ "@semantic-release/changelog", - "@semantic-release/npm", "@semantic-release/git", - "@semantic-release/github", - "@qiwi/semantic-release-gh-pages-plugin" + "@semantic-release/github" ], "publish": [ - "@semantic-release/github", - { - "path": "@qiwi/semantic-release-gh-pages-plugin", - "msg": "github pages release", - "src": "docs/", - "branch": "gh-pages" - }, - "@semantic-release/npm" + "@semantic-release/github" ], "success": [ "@semantic-release/github"