From cc7eeb599c4d5dfe3d5cc2714af9304c4d6a9ff3 Mon Sep 17 00:00:00 2001 From: jheddings Date: Sat, 2 Aug 2025 07:50:34 -0600 Subject: [PATCH] Updated release to match Obsidian plugin submission. --- .github/workflows/release.yaml | 15 +++++---------- package.json | 9 ++++++--- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4e6280b..67aa3dd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -4,7 +4,7 @@ run-name: Release ${{ github.ref_name }} on: push: tags: - - "v*" + - "[0-9]+.[0-9]+.[0-9]+" jobs: release: @@ -26,19 +26,14 @@ jobs: - name: Build plugin run: npm run build - - name: Extract version from tag + - name: Get version from tag id: version - run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT + run: echo "VERSION=${{ github.ref_name }}" >> $GITHUB_OUTPUT - - name: Verify gh CLI and create release - id: create_release + - name: Create release run: | - # Verify gh CLI is available and authenticated - gh auth status - - # Create release with auto-generated notes gh release create ${{ github.ref_name }} \ - --title "obsidian-stomp-${{ steps.version.outputs.VERSION }}" \ + --title "obsidian-stomp-${{ github.ref_name }}" \ --generate-notes --draft \ ./main.js ./manifest.json ./styles.css env: diff --git a/package.json b/package.json index eb5ac7b..e5fae11 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,9 @@ "author": "Jason Heddings", "license": "MIT", "main": "main.js", + "config": { + "tag-version-prefix": "" + }, "scripts": { "prepare": "husky", "dev": "node esbuild.config.mjs", @@ -13,9 +16,9 @@ "lint": "eslint --fix .", "test": "npm run build", "preflight": "npm run build && npm test && npm run format && npm run lint", - "release": "npm run preflight && git tag v$npm_package_version && git push && git push --tags", - "version": "node version.mjs && git add manifest.json versions.json", - "postversion": "git commit --amend -m \"obsidian-stomp-$npm_package_version\"" + "release": "npm run preflight && git push && git push --tags", + "version": "node version.mjs && npm run format && git add manifest.json versions.json", + "postversion": "git commit --amend -m \"obsidian-stomp-$npm_package_version\" && git tag -f $npm_package_version" }, "keywords": [ "obsidian",