Skip to content

Commit

Permalink
fix: more fixes for semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
bakon committed Aug 20, 2019
1 parent 7570dde commit ccdf5d0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 49 deletions.
71 changes: 28 additions & 43 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ defaults: &defaults
working_directory: ~/project

jobs:

test:
<<: *defaults
docker:
Expand All @@ -39,75 +40,64 @@ jobs:
- run: ./node_modules/.bin/codecov
- save_cache: *save-deps-cache

build:
release:
<<: *defaults
docker:
- image: circleci/node:10
steps:
- checkout
- attach_workspace:
at: ~/project
- restore_cache: *restore-deps-cache
- run: npm install
- run: npm run build
- run: ls
- 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
- save_cache: *save-deps-cache

release:
linuxbuild:
<<: *defaults
docker:
- image: circleci/node:10
steps:
- checkout
- restore_cache: *restore-deps-cache
- run:
name: "Setup custom environment variables"
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 build
- 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: git checkout .
- run: ./node_modules/.bin/semantic-release
- save_cache: *save-deps-cache
- run: npm run electron:build
- persist_to_workspace:
root: ~/project
paths:
- dist/*

windowsbuild:
<<: *defaults
docker:
- image: electronuserland/builder:wine
steps:
- checkout
- run:
name: "Setup custom environment variables"
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 build
- run: npm run electron:build -- --win
- persist_to_workspace:
root: ~/project
paths:
- dist/*

macbuild:
<<: *defaults
macos:
xcode: "10.2.1"
docker:
- image: electronuserland/builder:wine
steps:
- checkout
- run: brew install nodenv
- run: eval "$(nodenv init -)"
- run:
name: "Setup custom environment variables"
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 build
- run: npm run electron:build
- run: npm run electron:build -- --win
- persist_to_workspace:
root: ~/project
paths:
- dist/*

linuxbuild:
macbuild:
<<: *defaults
docker:
- image: circleci/node:10
macos:
xcode: "10.2.1"
steps:
- checkout
- run: brew install nodenv
- run: eval "$(nodenv init -)"
- run:
name: "Setup custom environment variables"
command: |
Expand All @@ -126,30 +116,25 @@ workflows:
jobs:
- test:
filters: *filter-only-semantic-pr
- build:
filters: *filter-only-semantic-pr

release:
jobs:
- test:
filters: *filter-only-master
- build:
- linuxbuild:
filters: *filter-only-master
- windowsbuild:
filters: *filter-only-master
- macbuild:
filters: *filter-only-master
- linuxbuild:
filters: *filter-only-master
- hold:
filters: *filter-only-master
type: approval
requires:
- test
- build
- linuxbuild
- windowsbuild
- macbuild
- linuxbuild
- release:
filters: *filter-only-master
requires:
Expand Down
5 changes: 0 additions & 5 deletions .releaserc
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@
"@semantic-release/changelog",
"@semantic-release/git",
"@semantic-release/github",
"@qiwi/semantic-release-gh-pages-plugin"
],
"publish": [
"@semantic-release/github",
{
"path": "@qiwi/semantic-release-gh-pages-plugin",
"msg": "github pages release",
"src": "build/",
"branch": "gh-pages",
"assets": [
{
"path": "dist/*.tar.gz",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enui",
"version": "1.1.1-rc2",
"version": "1.1.2-rc2",
"description": "User interface for managing nodes through enAPI",
"main": "build/electron.ts",
"homepage": ".",
Expand All @@ -11,6 +11,7 @@
},
"scripts": {
"start": "react-scripts start",
"version": "cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]'",
"build": "react-scripts build",
"lint": "tslint --fix -p .",
"test": "npm run lint && react-scripts test --coverage --passWithNoTests",
Expand Down

0 comments on commit ccdf5d0

Please sign in to comment.