Skip to content

Commit

Permalink
Use action-get-latest-tag to get latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
candy02058912 committed Sep 6, 2024
1 parent 466f93c commit 604c4f8
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/publish-latest-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
outputs:
tag_name: ${{ steps.get_tag.outputs.tag_name }}

steps:
- name: Checkout code
Expand All @@ -20,18 +18,18 @@ jobs:
with:
node-version: "20"

- name: Get tag name
- name: Get latest tag
id: get_tag
run: |
git fetch --tags --force
LATEST_TAG=$(git describe --tags --abbrev=0)
echo "tag_name=$LATEST_TAG" >> $GITHUB_OUTPUT
uses: actions-ecosystem/action-get-latest-tag@v1
with:
semver_only: true
initial_version: 0.0.0

- 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/${{ steps.get_tag.outputs.tag_name }}-${{ github.sha }}/g' {} +"
run: "find . -type f -exec sed -i 's/0.0.0-placeholder/${{ steps.get_tag.outputs.tag }}-${{ github.sha }}/g' {} +"

- name: Build and create plugin zip
run: npm run plugin-zip
Expand Down

0 comments on commit 604c4f8

Please sign in to comment.