From 427cbf11e31e8d277814cca4c5cb0fa802763a28 Mon Sep 17 00:00:00 2001 From: Felipe Cardozo Date: Fri, 11 Aug 2023 11:22:34 -0300 Subject: [PATCH] Unitypackage (#124) * Use .unitypackage for releases too * add instructions on how to install unitypackage * add trilitech as owner of the structured repository --- .github/workflows/release.yml | 33 ++++++++++++++++++++++++++++----- README.md | 8 ++++++++ 2 files changed, 36 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 73930c1a..cd262045 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: push: tags: - - '*.*.*' + - "*.*.*" jobs: release: @@ -11,20 +11,41 @@ jobs: permissions: contents: write steps: + - name: Checkout Unity project structure + uses: actions/checkout@v2 + with: + repository: trilitech/tezos-unity-sdk-structured + - name: Check out the repo uses: actions/checkout@v3 + with: + path: Assets/TezosUnitySdk - name: Archive Release uses: thedoctor0/zip-release@0.7.1 with: - type: 'zip' - filename: 'tezos-unity-sdk.zip' - exclusions: '*.git* *.github*' + type: "zip" + directory: ./Assets/TezosUnitySdk/ + filename: "tezos-unity-sdk.zip" + exclusions: "*.git* *.github*" + + - name: Create unitypackageFiles + run: | + echo "Assets/TezosUnitySdk.meta" > unitypackageFiles + mv Assets/TezosUnitySdk/Samples~ Assets/TezosUnitySdk/Samples + find ./Assets/TezosUnitySdk/ -name \*.meta ! -path "./Assets/TezosUnitySdk/Tests*" ! -path "./Assets/TezosUnitySdk/*.md.meta" >> unitypackageFiles + + - name: Create unitypackage + uses: pCYSl5EDgo/create-unitypackage@master + with: + package-path: 'TezosUnitySdk.unitypackage' + include-files: unitypackageFiles - name: Parse changelog id: changelog uses: mindsers/changelog-reader-action@v2 with: + path: ./Assets/TezosUnitySdk/CHANGELOG.md version: ${{ github.ref_name }} - name: Release @@ -36,4 +57,6 @@ jobs: ## ${{ steps.changelog.outputs.date }} ${{ steps.changelog.outputs.changes }} prerelease: ${{ steps.changelog.outputs.status == 'prereleased' }} - files: 'tezos-unity-sdk.zip' + files: | + ./Assets/TezosUnitySdk/tezos-unity-sdk.zip + TezosUnitySdk.unitypackage diff --git a/README.md b/README.md index cb2743d1..5be38195 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,14 @@ developers with the ability to: The Tezos SDK supports Desktop, Android, iOS, and browsers. Beyond allowing game developers to interact with the Tezos blockchain, this SDK is a helpful resource for developing any Tezos decentralized application (dApp). +### Install from unitypackage file + +You can install TezosUnitySdk via `.unitypackage` file. To load a package from a unitypackage file: + +* Go to [Releases](https://github.com/trilitech/tezos-unity-sdk/releases) page and download the latest `TezosUnitySdk.unitypackage`. +* Open your project in Unity Editor. +* Double-click the `TezosUnitySdk.unitypackage` file to import it into the current project. + ### Install from a Git URL You can install the UPM package via directly Git URL. To load a package from a Git URL: