From 02ba7920cd4b86dbca4995c8ea58b6cc3702c073 Mon Sep 17 00:00:00 2001 From: Candy Tsai Date: Fri, 6 Sep 2024 14:55:54 +0800 Subject: [PATCH] Use tag-dev-sha as version name for latest trunk plugin build (#130) --- .github/workflows/publish-latest-plugin-zip.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-latest-plugin-zip.yml b/.github/workflows/publish-latest-plugin-zip.yml index 7ebc779..45ca04b 100644 --- a/.github/workflows/publish-latest-plugin-zip.yml +++ b/.github/workflows/publish-latest-plugin-zip.yml @@ -8,6 +8,8 @@ on: jobs: build: runs-on: ubuntu-latest + outputs: + tag_name: ${{ steps.get_tag.outputs.tag_name }} steps: - name: Checkout code @@ -18,11 +20,15 @@ jobs: with: node-version: "20" + - name: Get tag name + id: get_tag + run: echo "tag_name=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT + - name: Install dependencies run: npm ci - name: Update version to latest trunk commit - run: "find . -type f -exec sed -i 's/0.0.0-placeholder/${{ github.sha }}/g' {} +" + run: "find . -type f -exec sed -i 's/0.0.2-dev-e35b494710b4d5d40cc0b7adfe5398ef52307bfb/${{ steps.get_tag.outputs.tag_name }}-${{ github.sha }}/g' {} +" - name: Build and create plugin zip run: npm run plugin-zip