Skip to content

Bump plugin version to 0.2.0 #3

Bump plugin version to 0.2.0

Bump plugin version to 0.2.0 #3

Workflow file for this run

name: Release
on:
push:
tags:
- 'unity-v*'
# Plugin releases are cut locally with scripts/release-plugin.sh because
# PluginApi.dll ships with Logi Options+ and cannot be obtained in CI.
jobs:
unity:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Sync package.json version
shell: bash
run: |
version="${GITHUB_REF_NAME#unity-v}"
tmp=$(mktemp)
jq --arg v "$version" '.version = $v' unity-package/package.json > "$tmp"
mv "$tmp" unity-package/package.json
cat unity-package/package.json
- name: Commit version bump if needed
shell: bash
run: |
if [ -n "$(git status --porcelain unity-package/package.json)" ]; then
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add unity-package/package.json
git commit -m "Bump unity-package to ${GITHUB_REF_NAME#unity-v}"
git push origin HEAD:main
fi
- name: Publish release
uses: softprops/action-gh-release@v2
with:
name: HapticBridge for Unity — Package ${{ github.ref_name }}
generate_release_notes: true
body: |
Unity Package Manager → `+` → Add package from git URL:
```
https://github.com/edinylcnn/LogiHapticsForUnity.git?path=/unity-package#${{ github.ref_name }}
```
Usage:
```csharp
using HapticBridge;
HapticsBridge.Trigger(HapticEvent.Click);
```
For the companion Logi Options+ plugin (`.lplug4`), see the `plugin-v*` release.