From 215231511796e66c85e5a73ce47b8438850b19d9 Mon Sep 17 00:00:00 2001 From: Grol Grol Date: Mon, 3 Feb 2025 02:15:56 +0300 Subject: [PATCH] add auto tag --- .github/workflows/release.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ef9566b..e606f5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ name: Build and Release Obsidian Plugin on: push: branches: - - master # Запуск при пуше в мастер + - master # Запуск при пуше в master jobs: build: @@ -32,7 +32,7 @@ jobs: zip -r obsidian-plugin.zip ./* - name: Upload artifact - uses: actions/upload-artifact@v4 # Обновлённая версия + uses: actions/upload-artifact@v4 with: name: obsidian-plugin path: release/obsidian-plugin.zip @@ -51,9 +51,19 @@ jobs: name: obsidian-plugin path: release + - name: Get version from manifest.json + id: get_version + run: echo "VERSION=$(jq -r .version manifest.json)" >> $GITHUB_ENV + + - name: Create tag + run: | + git tag v${{ env.VERSION }} + git push origin v${{ env.VERSION }} + - name: Create GitHub Release uses: softprops/action-gh-release@v1 with: + tag_name: v${{ env.VERSION }} files: release/obsidian-plugin.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}