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
26 changes: 3 additions & 23 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: publish

on:
workflow_dispatch:
push:
branches:
- main

jobs:
publish_gh_packages:
Expand Down Expand Up @@ -33,26 +36,3 @@ jobs:
run: pnpm publish --access restricted
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
needs: publish_gh_packages
runs-on: ubuntu-latest

permissions:
contents: write # publish a GitHub release
issues: write # comment on released issues
pull-requests: write # comment on released pull requests

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v4
with:
node-version: "lts/*"

- name: semantic-release
run: npx semantic-release@24
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 36 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 @@ -21,7 +30,32 @@ jobs:
with:
node-version: "lts/*"

- name: semantic-release
run: npx semantic-release@24
- name: Read package version
id: pkg
run: |
VERSION=$(node -p 'require("./package.json").version')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

- 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 }}
4 changes: 0 additions & 4 deletions .releaserc.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "tauri-plugin-keystore"
version = "2.2.0"
version = "2.3.1"
authors = ["0x330a"]
description = "Interact with the device-native key storage (Android Keystore, iOS Keychain) & perform ecdh operations for generating symmetric keys"
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metasig/tauri-plugin-keystore-api",
"version": "2.3.0",
"version": "2.3.1",
"author": "0x330a",
"description": "Interact with the device-native key storage (Android Keystore, iOS Keychain) & perform ecdh operations for generating symmetric keys",
"type": "module",
Expand Down