83 lines
No EOL
2.1 KiB
YAML
83 lines
No EOL
2.1 KiB
YAML
name: Actions 😎
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
test:
|
|
name: Test my project 🧪
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Checkout
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
lfs: true
|
|
|
|
# Cache
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: Library
|
|
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
|
|
restore-keys: |
|
|
Library-
|
|
|
|
# Test
|
|
- name: Run tests
|
|
uses: game-ci/unity-test-runner@v4
|
|
env:
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
with:
|
|
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build:
|
|
needs: test
|
|
|
|
name: Build my project ✨
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false # if one build fails, other platforms will still be built
|
|
matrix:
|
|
targetPlatform:
|
|
- os: StandaloneWindows64
|
|
channel: win
|
|
steps:
|
|
# Checkout
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
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
|
|
env:
|
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
with:
|
|
targetPlatform: ${{ matrix.targetPlatform.os }}
|
|
allowDirtyBuild: true
|
|
buildName: Roses
|
|
|
|
# Deploy
|
|
- uses: manleydev/butler-publish-itchio-action@master
|
|
env:
|
|
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
|
|
CHANNEL: ${{ matrix.targetPlatform.channel }}
|
|
ITCH_GAME: roses
|
|
ITCH_USER: Geri8
|
|
PACKAGE: build/${{ matrix.targetPlatform.os }}
|
|
VERSION_FILE: version_number.txt |