From a7f65dc771f8872a19187ef3c7f58d54dc8285be Mon Sep 17 00:00:00 2001 From: Lukas Domagala Date: Sat, 19 Feb 2022 14:20:33 +0100 Subject: [PATCH 1/2] add circleci for publishing a preview version --- .circleci/config.yml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1761c308f..3a80cb6ff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -234,7 +234,7 @@ jobs: GHR_CMD=ghr fi ${GHR_CMD} -t ${GITHUB_TOKEN} ${EXTRA_RELEASE_OPTIONS} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -b "${BODY}" -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} /tmp/artifacts/ - marketplace-publish: + marketplace-publish: docker: - image: circleci/node:latest working_directory: ~/calva @@ -254,6 +254,26 @@ jobs: else npx ${VSCE_CMD} fi + marketplace-preview-publish: + docker: + - image: circleci/node:latest + working_directory: ~/calva + steps: + - attach_workspace: + at: /tmp + - run: + name: Restore build + command: rmdir ~/calva && cp -r /tmp/build ~/calva + - run: + name: Publish to the marketplace + command: | + VSCE_CMD="vsce publish --pre-release --packagePath /tmp/artifacts/calva-$(node -p 'require("./package.json").version').vsix -p ${PUBLISH_TOKEN}" + if [ "${IS_LOCAL}" = YES ] + then + echo "Dry npx ${VSCE_CMD}" + else + npx ${VSCE_CMD} + fi open-vsx-publish: docker: - image: circleci/node:latest @@ -437,6 +457,20 @@ workflows: tags: only: /^v\d+\.\d+\.\d+-?.*/ context: Calva + - marketplace-preview-publish: + requires: + - prettier-check + - eslint-check + - test-grammar + - test-cljslib + - test-integration + - test-ts-unit + filters: + branches: + ignore: /.*/ + tags: + only: /^v\d+\.\d+\.\d+$/ + context: Calva - marketplace-publish: requires: - github-release From 15fa9b4ebf876b3ca00c20a59975b5b34e16a1ac Mon Sep 17 00:00:00 2001 From: Lukas Domagala Date: Sat, 19 Feb 2022 14:26:36 +0100 Subject: [PATCH 2/2] fix yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3a80cb6ff..1886013dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -234,7 +234,7 @@ jobs: GHR_CMD=ghr fi ${GHR_CMD} -t ${GITHUB_TOKEN} ${EXTRA_RELEASE_OPTIONS} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -b "${BODY}" -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} /tmp/artifacts/ - marketplace-publish: + marketplace-publish: docker: - image: circleci/node:latest working_directory: ~/calva