diff --git a/.github/scripts/functions.sh b/.github/scripts/functions.sh index 465ef43..b460341 100755 --- a/.github/scripts/functions.sh +++ b/.github/scripts/functions.sh @@ -10,11 +10,16 @@ packageVersion() { echo $VERSION } +# @description Add github actions state and output variables to be handled on .yml workflow files +# +# @see [shdoc](https://github.com/reconquest/shdoc) +# @see [Deprecating save-state and set-output commands](https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands) githubActionsOutputs() { CURRENT_TAG=$(git describe --tags $(git rev-list --tags --max-count=1)) COMMIT_MESSAGE=$(git log -1 --pretty=%B) - echo ::set-output name=tag::$CURRENT_TAG - echo ::set-output name=commit_message::$COMMIT_MESSAGE + # Use the format {name}={value} instead of ::set-output + echo "{tag}={$CURRENT_TAG}" >> $GITHUB_OUTPUT + echo "{commit_message}={$COMMIT_MESSAGE}" >> $GITHUB_OUTPUT } copyPackagesContent() { diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dbaa53a..de000de 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,9 +6,12 @@ on: repository_dispatch: types: [on-demand-test] env: + # PS: You can define github action variables in a repository, without modify this file + # from: https://github.com/[profile]/[repository]/settings/variables/actions PKG_BRANCH: upm PKG_NAME: com.benoitfreslon.vibration PKG_ROOT: ./ + EXCLUDE_REMOVE_FILES: '!(Packages|.github|.git|README.md|README.md.meta|LICENSE|LICENSE.meta|Images|Images.meta|.|..)' jobs: split-upm: name: Create upm package branch (force) @@ -31,7 +34,7 @@ jobs: run: | git checkout --orphan "$PKG_BRANCH" shopt -s extglob dotglob - rm -rf !(Packages|.github|.git|README.md|README.md.meta|LICENSE|LICENSE.meta|.|..) + rm -rf $EXCLUDE_REMOVE_FILES ls -la ./ - name: Move ./Packages content to root run: ./.github/scripts/functions.sh movePackagesFolder diff --git a/Images.meta b/Images.meta new file mode 100644 index 0000000..1c1a524 --- /dev/null +++ b/Images.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c8e81c7db33043e68f0caa00db55cccc +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Images/Icons.meta b/Images/Icons.meta new file mode 100644 index 0000000..5411c47 --- /dev/null +++ b/Images/Icons.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: e7aa47501c634e5ba31545747f0ae7fb +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Images/Icons/android-icon.png b/Images/Icons/android-icon.png new file mode 100644 index 0000000..148da64 Binary files /dev/null and b/Images/Icons/android-icon.png differ diff --git a/Images/Icons/android-icon.png.meta b/Images/Icons/android-icon.png.meta new file mode 100644 index 0000000..fcee902 --- /dev/null +++ b/Images/Icons/android-icon.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: f933b0819250496e804e0bf9453c5cbc +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Images/Icons/ios-icon.png b/Images/Icons/ios-icon.png new file mode 100644 index 0000000..672e3db Binary files /dev/null and b/Images/Icons/ios-icon.png differ diff --git a/Images/Icons/ios-icon.png.meta b/Images/Icons/ios-icon.png.meta new file mode 100644 index 0000000..096a1e7 --- /dev/null +++ b/Images/Icons/ios-icon.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: ec25a935b6df43ac805fcf5d194528eb +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Images/Icons/webgl-icon.png b/Images/Icons/webgl-icon.png new file mode 100644 index 0000000..786552b Binary files /dev/null and b/Images/Icons/webgl-icon.png differ diff --git a/Images/Icons/webgl-icon.png.meta b/Images/Icons/webgl-icon.png.meta new file mode 100644 index 0000000..78ea70e --- /dev/null +++ b/Images/Icons/webgl-icon.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 739deb37b1c340428412e0b793fd3da1 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Images/haptic-logo-color.png b/Images/haptic-logo-color.png new file mode 100644 index 0000000..47438bc Binary files /dev/null and b/Images/haptic-logo-color.png differ diff --git a/Images/haptic-logo-color.png.meta b/Images/haptic-logo-color.png.meta new file mode 100644 index 0000000..a672212 --- /dev/null +++ b/Images/haptic-logo-color.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: c633211abc1145a5a486bfa5878cc0dd +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Images/vibration-component-inspector.png b/Images/vibration-component-inspector.png new file mode 100644 index 0000000..6f1dcc8 Binary files /dev/null and b/Images/vibration-component-inspector.png differ diff --git a/Images/vibration-component-inspector.png.meta b/Images/vibration-component-inspector.png.meta new file mode 100644 index 0000000..ffb2f99 --- /dev/null +++ b/Images/vibration-component-inspector.png.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 918dc7918d2243148352b5ef41ef4c9e +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.benoitfreslon.vibration/package.json b/Packages/com.benoitfreslon.vibration/package.json index de5cb8d..9e6c862 100644 --- a/Packages/com.benoitfreslon.vibration/package.json +++ b/Packages/com.benoitfreslon.vibration/package.json @@ -2,7 +2,7 @@ "name": "com.benoitfreslon.vibration", "author": "Benoit Freslon, AminSojoudi, SH42913", "displayName": "Vibration", - "description": "Native free plugin for Unity for iOS and Android. Use custom vibrations on mobile.", + "description": "Native free plugin for Unity for Android, iOS and WebGL. Use custom vibrations on mobile.", "unity": "2019.3", "version": "0.1.0", "keywords": [], diff --git a/README.md b/README.md index 3ee97e7..e41b92e 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,127 @@ -# Vibration +# Vibration/Haptics: Unity Plugin -Native **free** plugin for Unity for iOS and Android. +