From ad79e24e68aa0c45013f9571b0ae188f19737cb5 Mon Sep 17 00:00:00 2001 From: Scott Esbrandt Date: Mon, 3 May 2021 11:15:50 -0400 Subject: [PATCH] fix: correct publishing job for semantic release --- .circleci/config.yml | 70 +++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 213cdcd..391d344 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 orbs: snyk: snyk/snyk@0.0.8 jobs: - build-test-monitor: + build-test-publish: docker: - image: circleci/node:12 steps: @@ -16,35 +16,36 @@ jobs: fail-on-issues: true monitor-on-build: true token-variable: SNYK_TOKEN - - run: - name: Create release binaries - command: | - nexe dist/index.js -t windows-x64-10.16.0 -o ./artifacts/snyk-user-sync-tool-win.exe - nexe dist/index.js -t mac-x64-10.21.0 -o ./artifacts/snyk-user-sync-tool-macos - nexe dist/index.js -t linux-x86-12.16.2 -o ./artifacts/snyk-user-sync-tool-linux-x86 - nexe dist/index.js -t linux-x64-12.16.2 -o ./artifacts/snyk-user-sync-tool-linux-x64 - sha256sum ./artifacts/snyk-user-sync-tool-win.exe > ./artifacts/snyk-user-sync-tool-win.exe.sha256 - sha256sum ./artifacts/snyk-user-sync-tool-macos > ./artifacts/snyk-user-sync-tool-macos.sha256 - sha256sum ./artifacts/snyk-user-sync-tool-linux-x86 > ./artifacts/snyk-user-sync-tool-linux-x86.sha256 - sha256sum ./artifacts/snyk-user-sync-tool-linux-x64 > ./artifacts/snyk-user-sync-tool-linux-x64.sha256 - cat package.json | grep version | cut -f2 -d\: | sed 's/"//g' | sed 's/\,//' > ./VERSION - - persist_to_workspace: - root: ./artifacts - paths: - - ./* - - persist_to_workspace: - root: ./ - paths: - - VERSION - publish-github-release: - docker: - - image: circleci/golang:latest - steps: - - attach_workspace: - at: ./artifacts - - attach_workspace: - at: ./ - - run: npx semantic-release + - run: npx semantic-release + #- run: + # name: Create release binaries + # command: | + # nexe dist/index.js -t windows-x64-10.16.0 -o ./artifacts/snyk-user-sync-tool-win.exe + # nexe dist/index.js -t mac-x64-10.21.0 -o ./artifacts/snyk-user-sync-tool-macos + # nexe dist/index.js -t linux-x86-12.16.2 -o ./artifacts/snyk-user-sync-tool-linux-x86 + # nexe dist/index.js -t linux-x64-12.16.2 -o ./artifacts/snyk-user-sync-tool-linux-x64 + # sha256sum ./artifacts/snyk-user-sync-tool-win.exe > ./artifacts/snyk-user-sync-tool-win.exe.sha256 + # sha256sum ./artifacts/snyk-user-sync-tool-macos > ./artifacts/snyk-user-sync-tool-macos.sha256 + # sha256sum ./artifacts/snyk-user-sync-tool-linux-x86 > ./artifacts/snyk-user-sync-tool-linux-x86.sha256 + # sha256sum ./artifacts/snyk-user-sync-tool-linux-x64 > ./artifacts/snyk-user-sync-tool-linux-x64.sha256 + # cat package.json | grep version | cut -f2 -d\: | sed 's/"//g' | sed 's/\,//' > ./VERSION + #- persist_to_workspace: + # root: ./artifacts + # paths: + # - ./* + #- persist_to_workspace: + # root: ./ + # paths: + # - VERSION + #publish-github-release: + # docker: + # - image: circleci/golang:latest + # steps: + # - attach_workspace: + # at: ./artifacts + # - attach_workspace: + # at: ./ + # - run: npx semantic-release # - run: # name: "Publish Release on GitHub" # command: | @@ -83,20 +84,17 @@ workflows: only: - master jobs: - - build-test-monitor: + - build-test-publish: context: SNYK - build-test-monitor-release: + build-test-publish: jobs: - - build-test-monitor: + - build-test-publish: context: SNYK filters: branches: only: - master - - publish-github-release: - requires: - - build-test-monitor build-test: jobs: - build-test: