From 16b178a67a4851dc0d912e0b40d98537811a7400 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C5=82a=C5=BCej=20Che=C5=82kowski?= Date: Tue, 17 Oct 2023 13:35:26 +0200 Subject: [PATCH] fix: publish npm on completed Release --- .github/workflows/publish.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5a98cd0..b54d431 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,8 @@ name: Publish NPM on: - release: - types: [released] + workflow_run: + workflows: [Release] + types: [completed] jobs: release: runs-on: ubuntu-latest @@ -9,6 +10,11 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Checkout latest tag + run: | + git fetch --all --tags -f + git rev-list --tags --max-count=1 + git checkout $(git describe --tags `git rev-list --tags --max-count=1`) - name: Setup Node.js uses: actions/setup-node@v3 with: