From 6350cf8318b51adcc0997bc6790b86b477805a2d Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Thu, 20 Jun 2024 16:02:25 +0200 Subject: [PATCH 1/7] Update README.md --- README.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c93ec30..ddd4a5f 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,39 @@ -# Stash for Unity +# Stash SDK for Unity ![buildtest](https://github.com/stashgg/stash-unity/actions/workflows/main.yml/badge.svg) -![buildtest](https://github.com/stashgg/stash-unity/actions/workflows/main.yml/badge.svg) - ## About This package is designed to get your Unity project up and running with Stash web shop in a few easy steps. Package is wrapping Stash API endpoints and is very lightweight with no external dependencies. -## Requirements +To start with the SDK, you need to import the package from the releases tab and read [getting started guide](https://docs.stash.gg/docs/configure-unity-project). -Stash package always targets the latest LTS version of Unity. We recommend you use the LTS version of Unity to build projects that are in production or about to ship. However, you should not encounter any issues when integrating or migrating into any other versions of Unity above the targeted release. +## Usage +To interact with Stash API and handle responses, the SDK offers the `StashAuth`, `StashLauncher` and other classes, named according to the product you plan to use. +All classes are static, with no inheritance to the MonoBehaviour, so they can only be called when needed. -## Changelog - -Package follows Semantic Versioning `(major.minor.patch)`. Any potential breaking changes will always cause a major version increment, non-breaking new features will cause a minor version increment, and bugfixes will cause a patch version increment. -A full version changelog is available in the [changelog](/CHANGELOG.md) file. +## Requirements +Stash package always targets the latest LTS version of Unity. We recommend you use the LTS version of Unity to build projects that are in production or about to ship. However, you should not encounter any issues when integrating or migrating into any other versions of Unity above the targeted release. ## Installation +### Import package manually 1. Download [the latest build from the release page](https://github.com/stashgg/stash-unity/releases) 2. Import the `.unitypackage` file into your Unity game using the [local asset package import](https://docs.unity3d.com/Manual/AssetPackagesImport.html) process. 3. Optionally select the `Scenes` folder to test out our reference implementations. +### Import package via repository +1. In the Unity editor main menu, click Window > Package Manager. +2. Click the + icon and select Add package from git URL. +3. Specify the git repository URL: https://github.com/stashgg/stash-unity.git?path=Assets/Stash. + +## Changelog + +Package follows Semantic Versioning `(major.minor.patch)`. Any potential breaking changes will always cause a major version increment, non-breaking new features will cause a minor version increment, and bugfixes will cause a patch version increment. +A full version changelog is available in the [changelog](/CHANGELOG.md) file. ## Feedback and troubleshooting -- If you run into any problems or have a feature request, open up a [new issue](https://github.com/stashgg/stash-unity/issues/new) in the repository. Please follow the issue/request template. \ No newline at end of file +If you run into any problems or have a feature request, open up a [new issue](https://github.com/stashgg/stash-unity/issues/new) in the repository. Please follow the issue/request template. From 6e5dff514ea3dbda0eef3d34df6386d0c6c8aff2 Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Thu, 20 Jun 2024 16:03:31 +0200 Subject: [PATCH 2/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ddd4a5f..2250dc2 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ To start with the SDK, you need to import the package from the releases tab and ## Usage To interact with Stash API and handle responses, the SDK offers the `StashAuth`, `StashLauncher` and other classes, named according to the product you plan to use. -All classes are static, with no inheritance to the MonoBehaviour, so they can only be called when needed. +All classes are static, with no inheritance to the MonoBehaviour, no need to place them in the scene and can be called only when needed. ## Requirements From 37e8da16b2cc7d9bb5fd9cb339789fa84776ba14 Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Thu, 20 Jun 2024 16:07:13 +0200 Subject: [PATCH 3/7] Update main.yml --- .github/workflows/main.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c1719db..b07bf31 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: Library- # Build - - name: Build project + - name: Build project (Desktop) uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} @@ -31,6 +31,16 @@ jobs: with: targetPlatform: StandaloneWindows64 + # Build + - name: Build project (Mobile) + uses: game-ci/unity-builder@v4 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + with: + targetPlatform: Android + # Output - uses: actions/upload-artifact@v3 with: From 050d4f39c8fd7d08dc106ec9c97861f4b728898b Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Thu, 20 Jun 2024 16:12:46 +0200 Subject: [PATCH 4/7] Update main.yml --- .github/workflows/main.yml | 50 +++++++++++++++----------------------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b07bf31..32143fa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,48 +1,38 @@ -name: Test Build +name: Build project on: [push, pull_request] jobs: - build: - name: Test Package & Sample Scenes + buildForAllSupportedPlatforms: + name: Build for ${{ matrix.targetPlatform }} runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + targetPlatform: + - StandaloneWindows64 # Build a Windows 64-bit standalone. + - Android # Build an Android .apk standalone app. + - WebGL # WebGL. steps: - # Checkout - - name: Checkout repository - uses: actions/checkout@v4 + - uses: actions/checkout@v4 with: + fetch-depth: 0 lfs: true - - # Cache - uses: actions/cache@v3 with: path: Library - key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }} - restore-keys: | - Library- - - # Build - - name: Build project (Desktop) - uses: game-ci/unity-builder@v4 + key: Library-${{ matrix.targetPlatform }} + restore-keys: Library- + - if: matrix.targetPlatform == 'Android' + uses: jlumbroso/free-disk-space@v1.3.1 + - uses: game-ci/unity-builder@v4 env: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} with: - targetPlatform: StandaloneWindows64 - - # Build - - name: Build project (Mobile) - uses: game-ci/unity-builder@v4 - env: - UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} - UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} - with: - targetPlatform: Android - - # Output + targetPlatform: ${{ matrix.targetPlatform }} - uses: actions/upload-artifact@v3 with: - name: Build - path: build + name: Build-${{ matrix.targetPlatform }} + path: build/${{ matrix.targetPlatform }} From 3d49530ecc9bc589980fa6bb08a745a9c5ceb0ca Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Thu, 20 Jun 2024 16:34:12 +0200 Subject: [PATCH 5/7] Update README.md --- README.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2250dc2..aa71791 100644 --- a/README.md +++ b/README.md @@ -4,14 +4,19 @@ ## About -This package is designed to get your Unity project up and running with Stash web shop in a few easy steps. Package is wrapping Stash API endpoints and is very lightweight with no external dependencies. +This package is designed to get your Unity project up and running with the Stash web shop in a few easy steps. The package is wrapping Stash API endpoints and is very lightweight with no external dependencies. -To start with the SDK, you need to import the package from the releases tab and read [getting started guide](https://docs.stash.gg/docs/configure-unity-project). +To start with the SDK, you need to import the package from the releases tab and follow [getting started guide](https://docs.stash.gg/docs/configure-unity-project). ## Usage -To interact with Stash API and handle responses, the SDK offers the `StashAuth`, `StashLauncher` and other classes, named according to the product you plan to use. -All classes are static, with no inheritance to the MonoBehaviour, no need to place them in the scene and can be called only when needed. +To interact with Stash API and handle responses, the SDK offers the `StashAuth`, `StashLauncher`, and other classes, named according to the product you plan to use. +All classes are static, with no inheritance to the MonoBehaviour, no need to place them in the scene, and can be called only when needed. + +## Sample + +The repository contains a sample project. This scene is always up to date and pre-build for testing in the `Actions` tab. +For more samples, visit [playground repository](https://github.com/stashgg/stash-playground), keep in mind that some of the samples in the playground repository might be out of date and should not be used in production. ## Requirements From 3bbc7e7b719e3803f0c6d16b9529c7f81e2b242a Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Thu, 20 Jun 2024 16:35:17 +0200 Subject: [PATCH 6/7] Update .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 6a98eba..f090d9b 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,9 @@ # Gradle cache directory .gradle/ +# Idea IDE +.idea/ + # Autogenerated VS/MD/Consulo solution and project files ExportedObj/ .consulo/ From 8c213c1a2e26540909cfa1b9318409da317da0f0 Mon Sep 17 00:00:00 2001 From: Ondrej Rehacek Date: Thu, 20 Jun 2024 16:39:16 +0200 Subject: [PATCH 7/7] Update main.yml --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 32143fa..47aef97 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,6 +30,12 @@ jobs: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + androidExportType: 'androidAppBundle' + androidKeystoreName: user.keystore + androidKeystoreBase64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} + androidKeystorePass: ${{ secrets.ANDROID_KEYSTORE_PASS }} + androidKeyaliasName: ${{ secrets.ANDROID_KEYALIAS_NAME }} + androidKeyaliasPass: ${{ secrets.ANDROID_KEYALIAS_PASS }} with: targetPlatform: ${{ matrix.targetPlatform }} - uses: actions/upload-artifact@v3