From 6cfb236034e3f3b304ad3473dda06d0c6a7c3614 Mon Sep 17 00:00:00 2001 From: Jairo Panduro Date: Thu, 20 Oct 2022 22:05:32 +0200 Subject: [PATCH] fix: STRF-10157 Fix sending event data to paper repo --- .github/workflows/release.yml | 2 ++ .releaserc | 5 ++--- publish.sh | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 publish.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 893edae..928089d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,3 +22,5 @@ jobs: run: npm config list && npm run release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GA_USERNAME: ${{ secrets.PAT_USERNAME }} + GA_TOKEN: ${{ secrets.PAT_TOKEN }} \ No newline at end of file diff --git a/.releaserc b/.releaserc index 3c72502..8d22c7a 100644 --- a/.releaserc +++ b/.releaserc @@ -6,8 +6,7 @@ "@semantic-release/changelog", ["@semantic-release/github", { "assets": [ - {"path": "dist/blackbird-handlebars.js", "label": "helpers.js"}, - {"path": "dist/index.js", "label": "index.js"} + {"path": "dist/blackbird-handlebars.js", "label": "helpers.js"} ] }], "@semantic-release/npm", @@ -19,7 +18,7 @@ ], [ "@semantic-release/exec", { - "publishCmd": "curl -XPOST -u \"${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}\" -H \"Accept: application/vnd.github.everest-preview+json\" -H \"Content-Type: application/json\" https://api.github.com/repos/bigcommerce/paper/dispatches --data '{\"event_type\": \"bump_hbs\", \"version\": \"${nextRelease.version}\", \"notes\": \"${nextRelease.notes}\"}" + "publishCmd": "./publish.sh ${nextRelease.version} ${nextRelease.notes}" } ] ] diff --git a/publish.sh b/publish.sh new file mode 100644 index 0000000..26861fd --- /dev/null +++ b/publish.sh @@ -0,0 +1 @@ +curl -XPOST -u "$GA_USERNAME:$GA_TOKEN" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/bigcommerce/paper/dispatches --data '{"event_type": "bump_hbs", "version": "'$1'", "notes": "'$2'"}' \ No newline at end of file