Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
oliexe committed Jul 7, 2024
2 parents 58771d3 + 8c213c1 commit 7abf735
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 30 deletions.
46 changes: 26 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
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
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 }}
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: StandaloneWindows64

# Output
targetPlatform: ${{ matrix.targetPlatform }}
- uses: actions/upload-artifact@v3
with:
name: Build
path: build
name: Build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
# Gradle cache directory
.gradle/

# Idea IDE
.idea/

# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
Expand Down
33 changes: 23 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,44 @@
# Stash for Unity
# Stash SDK for Unity ![buildtest](https://github.com/stashgg/stash-unity/actions/workflows/main.yml/badge.svg)

<img src="https://i.ibb.co/LYPjvRj/3-D-Yellow.png" width="40%"></img>

![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.
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.

## Requirements
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).

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, no need to place them in the scene, and can be called only when needed.

## Changelog
## Sample

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.
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

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.
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.

0 comments on commit 7abf735

Please sign in to comment.