From 7c93be2b87d78ef176124a12168d649afc4c9c46 Mon Sep 17 00:00:00 2001 From: Candy Tsai Date: Fri, 6 Sep 2024 16:14:39 +0800 Subject: [PATCH] Replace placeholder version with tag-dev-sha for latest trunk releases (#133) --- .github/workflows/publish-latest-plugin-zip.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/publish-latest-plugin-zip.yml b/.github/workflows/publish-latest-plugin-zip.yml index 5f1dd84..b964d8f 100644 --- a/.github/workflows/publish-latest-plugin-zip.yml +++ b/.github/workflows/publish-latest-plugin-zip.yml @@ -12,6 +12,17 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Get most recent tag + id: get_tag + uses: WyriHaximus/github-action-get-previous-tag@v1 + with: + fallback: 1.0.0 + + - name: Update version to latest trunk commit + run: "find . -type f -exec sed -i 's/0.0.0-placeholder/${{ steps.get_tag.outputs.tag }}-dev-${{ github.sha }}/g' {} +" - name: Setup Node.js uses: actions/setup-node@v4