Skip to content

Commit

Permalink
fix: correct publishing job for semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-es committed May 3, 2021
1 parent f023807 commit ad79e24
Showing 1 changed file with 34 additions and 36 deletions.
70 changes: 34 additions & 36 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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: |
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ad79e24

Please sign in to comment.