Skip to content

Commit

Permalink
ci: add step to release script that updates the latest tag of publish…
Browse files Browse the repository at this point in the history
…ed packages
  • Loading branch information
dominikg committed Apr 7, 2022
1 parent dece3ed commit 5b47430
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 5b47430

Please sign in to comment.