From 5b474300646b24ffd921af11842ccec1364b4f59 Mon Sep 17 00:00:00 2001 From: dominikg Date: Thu, 7 Apr 2022 22:49:02 +0200 Subject: [PATCH] ci: add step to release script that updates the latest tag of published packages --- .github/workflows/release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c2d7fd1e65bd..96ffd99de54a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,6 +40,15 @@ jobs: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} UPDATE_TEMPLATE_SSH_KEY: ${{ secrets.UPDATE_TEMPLATE_SSH_KEY }} + - name: Update latest tag on published packages # only needed until we release 1.0.0 and exit pre-release mode + if: steps.changesets.outputs.published == 'true' + # wait a bit and then run "npm dist-tag add package@version latest" for all published packages + env: + published_packages: ${{steps.changesets.outputs.publishedPackages}} + run: | + sleep 20 + echo $published_packages | jq -r 'map((.name + "@" + .version)) | .[]' | while read pkgver; do echo npm dist-tag add $pkgver latest || continue;done + # TODO alert discord # - name: Send a Slack notification if a publish happens # if: steps.changesets.outputs.published == 'true'