From e116c58146a9a64ff881eeb0cd70dad536e6cab5 Mon Sep 17 00:00:00 2001 From: Derrick Koo Date: Thu, 20 Aug 2020 15:39:36 -0600 Subject: [PATCH] fix: semantic release config (#29) * fix: semantic release config * fix: command name checkout_code to checkout --- .circleci/config.yml | 23 ++++++++++++++++++++++- package.json | 12 ++++++------ 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b1f8c74..46129f3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,6 +52,20 @@ jobs: name: Release new version command: npm run release + # Reset alpha branch after a release + post_release: + docker: + - image: circleci/node:12 + steps: + - checkout + - run: + name: Set tip of alpha branch on top of release and force-push it to remote + command: | + git pull origin release + git checkout alpha + git reset --hard release -- + git push "https://$GITHUB_TOKEN@github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME.git" --force + workflows: version: 2 main: @@ -65,6 +79,13 @@ workflows: - build filters: branches: - only: + only: - release - alpha + - post_release: + requires: + - release + filters: + branches: + only: + - release diff --git a/package.json b/package.json index b6da4ac..1fa7f42 100644 --- a/package.json +++ b/package.json @@ -41,14 +41,14 @@ [ "semantic-release-version-bump", { - "files": "newspack-new-plugin-boilerplate.php", + "files": "newspack-sponsors.php", "callback": "npm run release:archive" } ], { "path": "@semantic-release/git", "assets": [ - "newspack-new-plugin-boilerplate.php", + "newspack-sponsors.php", "package.json", "package-lock.json", "CHANGELOG.md" @@ -71,8 +71,8 @@ { "assets": [ { - "path": "./release/newspack-new-plugin-boilerplate.zip", - "label": "newspack-new-plugin-boilerplate.zip" + "path": "./release/newspack-sponsors.zip", + "label": "newspack-sponsors.zip" } ] } @@ -86,11 +86,11 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/Automattic/newspack-new-plugin-boilerplate.git" + "url": "git+https://github.com/Automattic/newspack-sponsors.git" }, "license": "GPL-2.0-or-later", "bugs": { - "url": "https://github.com/Automattic/newspack-new-plugin-boilerplate/issues" + "url": "https://github.com/Automattic/newspack-sponsors/issues" }, "dependencies": { "@wordpress/api-fetch": "^3.12.0",