Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
35 changes: 33 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "tauri-plugin-p256-signer"
version = "0.2.0"
authors = [ "You" ]
description = ""
version = "0.3.1"
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"]
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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"
}
}