Skip to content

Commit

Permalink
docs release notification.
Browse files Browse the repository at this point in the history
  • Loading branch information
khajavi committed Mar 23, 2023
1 parent def871d commit 92de7e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,4 @@ jobs:
with:
fetch-depth: '0'
- name: Notify Main Repo of The New Docs Package
run: "PACKAGE_NAME=$(cat docs/package.json | grep '\"name\"' | awk -F'\"' '{print $4}')\necho $PACKAGE_NAME\nVERSION=$(npm view $PACKAGE_NAME version)\necho $VERSION\ncurl -L \\\n -X POST \\\n -H \"Accept: application/vnd.github+json\" \\\n -H \"Authorization: token ${{ secrets.PAT_TOKEN }}\"\\\n https://api.github.com/repos/zio/zio/dispatches \\\n -d '{\n \"event_type\":\"update-docs\",\n \"client_payload\":{\n \"package_name\":\"'\"${PACKAGE_NAME}\"'\", \n \"version\": \"'\"${VERSION}\"'\"\n }\n }'\n"
run: "NAME=$(cat docs/package.json | grep '\"name\"' | awk -F'\"' '{print $4}')\nVERSION=$(npm view $PACKAGE_NAME version)\ncurl -L \\\n -X POST \\\n -H \"Accept: application/vnd.github+json\" \\\n -H \"Authorization: token ${{ secrets.PAT_TOKEN }}\"\\\n https://api.github.com/repos/zio/zio/dispatches \\\n -d '{\n \"event_type\":\"update-docs\",\n \"client_payload\":{\n \"package_name\":\"'\"${NAME}\"'\", \n \"package_version\": \"'\"${VERSION}\"'\"\n }\n }'\n"
8 changes: 3 additions & 5 deletions zio-sbt-ci/src/main/scala/zio/sbt/ZioSbtCiPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,8 @@ object ZioSbtCiPlugin extends AutoPlugin {
checkout,
SingleStep(
name = "Notify Main Repo of The New Docs Package",
run = Some("""|PACKAGE_NAME=$(cat docs/package.json | grep '"name"' | awk -F'"' '{print $4}')
|echo $PACKAGE_NAME
run = Some("""|NAME=$(cat docs/package.json | grep '"name"' | awk -F'"' '{print $4}')
|VERSION=$(npm view $PACKAGE_NAME version)
|echo $VERSION
|curl -L \
| -X POST \
| -H "Accept: application/vnd.github+json" \
Expand All @@ -436,8 +434,8 @@ object ZioSbtCiPlugin extends AutoPlugin {
| -d '{
| "event_type":"update-docs",
| "client_payload":{
| "package_name":"'"${PACKAGE_NAME}"'",
| "version": "'"${VERSION}"'"
| "package_name":"'"${NAME}"'",
| "package_version": "'"${VERSION}"'"
| }
| }'
|""".stripMargin)
Expand Down

0 comments on commit 92de7e6

Please sign in to comment.