From b3340c6b7825816686911e06e3848e87dc4b001a Mon Sep 17 00:00:00 2001 From: Andres Gonzalez <17816698+agonzalezv@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:08:53 +1300 Subject: [PATCH 1/3] fix: create release from package version --- .github/workflows/publish.yaml | 2 +- .github/workflows/release.yaml | 35 ++++++++++++++++++++++++++++++++-- Cargo.toml | 6 +++--- package.json | 2 +- 4 files changed, 38 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index fb37c17..0d886fb 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -33,6 +33,6 @@ jobs: run: pnpm install --frozen-lockfile - name: pnpm publish - run: pnpm publish --access restricted --publish-branch main --tag next + run: pnpm publish --access restricted env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index efaaaa1..33bbc40 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,9 +2,18 @@ name: release on: workflow_dispatch: + workflow_run: + workflows: + - publish + types: + - completed jobs: release: + # Run on manual dispatch OR when the `publish` workflow completes successfully. + # When triggered by workflow_run, `github.event.workflow_run.conclusion` is set. + # Keep manual dispatch available as well. + if: "${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}" runs-on: ubuntu-latest permissions: @@ -20,8 +29,30 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "lts/*" + - name: Read package version + id: pkg + run: echo "version=$(node -p \"require('./package.json').version\")" >> $GITHUB_OUTPUT - - name: semantic-release - run: npx semantic-release@24 + - name: Create tag from package.json version + env: + VERSION: ${{ steps.pkg.outputs.version }} + run: | + set -e + TAG="v${VERSION}" + if git ls-remote --tags origin "refs/tags/$TAG" | grep -q "$TAG"; then + echo "Tag $TAG already exists on remote." + else + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + git tag -a "$TAG" -m "Release $TAG" + git push origin "$TAG" + fi + + - name: Create GitHub release + uses: softprops/action-gh-release@v2 + with: + tag_name: v${{ steps.pkg.outputs.version }} + name: Release v${{ steps.pkg.outputs.version }} + generate_release_notes: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/Cargo.toml b/Cargo.toml index 0771aeb..6fffa18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "tauri-plugin-p256-signer" -version = "0.2.0" -authors = [ "You" ] -description = "" +version = "0.3.0" +authors = [ "0x330a" ] +description = "JS Bindings for the tauri-plugin-p256-signer Tauri plugin" edition = "2021" rust-version = "1.77.2" exclude = ["/examples", "/dist-js", "/guest-js", "/node_modules"] diff --git a/package.json b/package.json index 834a0bc..9b06b6c 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,6 @@ "license": "Apache-2.0", "repository": { "type": "git", - "url": "git+https://github.com/Metasig/tauri-plugin-keystore.git" + "url": "git+https://github.com/Metasig/tauri-plugin-p256-signer.git" } } From cbdebc1d32d243cf02eed38bfc428fea37aa651c Mon Sep 17 00:00:00 2001 From: Andres Gonzalez <17816698+agonzalezv@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:09:06 +1300 Subject: [PATCH 2/3] 0.3.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9b06b6c..1ff5ed4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@metasig/tauri-plugin-p256-signer-api", - "version": "0.3.0", + "version": "0.3.1", "author": "0x330a", "description": "JS Bindings for the tauri-plugin-p256-signer Tauri plugin", "type": "module", From 4c781fad5f7e2b0119f47fafde29d6b9ec09d8f3 Mon Sep 17 00:00:00 2001 From: Andres Gonzalez <17816698+agonzalezv@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:10:00 +1300 Subject: [PATCH 3/3] fix: update cargo version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6fffa18..b8436dd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tauri-plugin-p256-signer" -version = "0.3.0" +version = "0.3.1" authors = [ "0x330a" ] description = "JS Bindings for the tauri-plugin-p256-signer Tauri plugin" edition = "2021"