Skip to content

Commit

Permalink
docs: update readme and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Jan 30, 2025
1 parent 119f45a commit 8fecbef
Show file tree
Hide file tree
Showing 7 changed files with 99 additions and 75 deletions.
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# This is a comment.
# Each line is a file pattern followed by one or more owners.
# https://docs.github.com/ja/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# Default owners
* @mob-sakai
37 changes: 37 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@

# Pull Request Template

## Description

- Please include a summary of the change and which issue is fixed.
- Please also include relevant motivation and context.
- List any dependencies that are required for this change.

Fixes #{issue_number}

## Type of change

Please write the commit message in the format corresponding to the change type.
Please see [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for more information.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Update documentations
- [ ] Others (refactoring, style changes, etc.)

## Test environment

- Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
- Unity version: [e.g. 2022.2.0f1]
- Build options: [e.g. IL2CPP, .Net 4.x, URP/HDRP]

## Checklist

- [ ] This pull request is for merging into the `develop` branch
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have checked my code and corrected any misspellings
8 changes: 4 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
zip:
description: 'The url to the zip file'
description: "The url to the zip file"
required: true

jobs:
Expand All @@ -19,10 +19,10 @@ jobs:
run: |
curl -L ${{ github.event.inputs.zip }} -o _site.zip
unzip _site.zip -d _site
find _site -name __MACOSX -exec rm -rf {} \;
find _site -name __MACOSX | xargs rm -rf
- name: 📦 Upload '_site'
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3

- name: 🚀 Deploy To GitHub Pages
uses: actions/deploy-pages@v2
uses: actions/deploy-pages@v4
39 changes: 0 additions & 39 deletions .github/workflows/merge.yml

This file was deleted.

14 changes: 2 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: 🔖 Release
run-name: 🔖 Release (${{ github.ref_name }})

on:
workflow_dispatch:
Expand Down Expand Up @@ -35,20 +36,9 @@ jobs:
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- run: |
echo "🔖 New release published: '${{ steps.release.outputs.new_release_published }}'" | tee -a $GITHUB_STEP_SUMMARY
echo "🔖 New release channel: '${{ steps.release.outputs.new_release_channel }}'" | tee -a $GITHUB_STEP_SUMMARY
echo "🔖 New release git tag: '${{ steps.release.outputs.new_release_git_tag }}'" | tee -a $GITHUB_STEP_SUMMARY
merge-to-develop:
name: 🔀 Merge to develop
needs: release
if: needs.release.outputs.released == 'true' && needs.release.outputs.channel == ''
uses: ./.github/workflows/merge.yml
with:
from: ${{ needs.release.outputs.tag }}
to: develop
permissions:
contents: write
60 changes: 45 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,36 @@
# UNITY_EMAIL: Unity user email to login
# UNITY_PASSWORD: Unity user password to login
name: 🧪 Test
run-name: 🧪 Test (${{ github.event.pull_request.title || github.ref_name }})

env:
# MINIMUM_VERSION: The minimum version of Unity.
MINIMUM_VERSION: 2019.4
# EXCLUDE_FILTER: The excluded versions of Unity.
EXCLUDE_FILTER: '(2020.2.0)'
EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.3)"

on:
workflow_dispatch:
inputs:
usePeriodVersions:
description: "Use the period versions (.0f1, .10f1, 20f1, ...)."
required: false
default: "true"
push:
branches:
- develop
- develop-preview
tags:
- "!*"
paths-ignore:
- "*.md"
pull_request:
- "**.md"
pull_request_target:
types:
- opened
- reopened
- synchronize
paths-ignore:
- "**.md"

jobs:
setup:
Expand All @@ -36,9 +45,12 @@ jobs:
id: setup
run: |
echo "==== Target Unity Versions ===="
LATEST_VERSIONS=`npx unity-changeset list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
# ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
ADDITIONAL_VERSIONS=[]
LATEST_VERSIONS=`npx unity-changeset@latest list --versions --latest-patch --min ${MINIMUM_VERSION} --json --all`
if [ "${{ inputs.usePeriodVersions }}" = "true" ]; then
ADDITIONAL_VERSIONS=`npx unity-changeset list --versions --grep '0f' --min ${MINIMUM_VERSION} --json`
else
ADDITIONAL_VERSIONS=[]
fi
VERSIONS=`echo "[${LATEST_VERSIONS}, ${ADDITIONAL_VERSIONS}]" \
| jq -c '[ flatten | sort | unique | .[] | select( test("${{ env.EXCLUDE_FILTER }}") | not ) ]'`
Expand All @@ -47,40 +59,55 @@ jobs:
test:
name: 🧪 Run tests
runs-on: ubuntu-latest
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
permissions:
checks: write
contents: read
needs: setup
strategy:
fail-fast: false
max-parallel: 4
max-parallel: 6
matrix:
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
steps:
- name: 🚚 Checkout
- name: 🚚 Checkout ($${{ github.ref }})
if: github.event_name == 'push'
uses: actions/checkout@v4

- name: 🚚 Checkout pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: 🚚 Marge pull request (pull_request_target)
if: github.event_name == 'pull_request_target'
run: |
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git merge origin/${{ github.event.pull_request.base.ref }} --no-edit
- name: 📥 Cache library
uses: actions/cache@v4
with:
path: Library
key: Library-${{ matrix.unityVersion }}-${{ github.sha }}
key: Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
restore-keys: |
Library-${{ matrix.unityVersion }}-
Library-
- name: 🛠️ Build Unity Project
- name: 🛠️ Build Unity Project (Test)
uses: game-ci/unity-builder@v4
timeout-minutes: 45
with:
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
targetPlatform: StandaloneLinux64
allowDirtyBuild: true
customParameters: -nographics
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}

- name: 🧪 Run tests
uses: game-ci/unity-test-runner@v4
Expand All @@ -91,4 +118,7 @@ jobs:
customParameters: -nographics
checkName: ${{ matrix.unityVersion }} Test Results
githubToken: ${{ github.token }}
coverageOptions: "dontClear;generateHtmlReport;generateBadgeReport;pathFilters:+**/Packages/src/**;assemblyFilters:+<packages>,-*.Editor,-*.Test"
env:
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
10 changes: 5 additions & 5 deletions Packages/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Custom properties for changing material properties are easy for experienced user

This package provides a component that allows easy modification of material properties for Unity UI (uGUI) without the need for shader-specific custom components.

![](https://github.com/mob-sakai/UIMaterialPropertyInjector/assets/12690315/adaf45ed-5852-4844-ad1a-daa231225be7)
![](https://github.com/user-attachments/assets/fcc54340-9fa5-4a7d-bc5b-3ccd7b317502)

**Key Features:**

Expand Down Expand Up @@ -71,7 +71,7 @@ _This package requires **Unity 2019.4 or later**._
```
- To update the package, use Package Manager UI (`Window > Package Manager`) or run the following command with `@{version}`:
```
openupm add com.coffee.ui-material-property-injector@1.0.0
openupm add com.coffee.ui-material-property-injector@1.1.0
```

#### Install via UPM (with Package Manager UI)
Expand All @@ -80,7 +80,7 @@ _This package requires **Unity 2019.4 or later**._
- Click `+ > Add package from git URL...` and input the repository URL: `https://github.com/mob-sakai/UIMaterialPropertyInjector.git?path=Packages/src`
![](https://gist.github.com/assets/12690315/24af63ed-8a2e-483d-9023-7aa53d913330)
- To update the package, change suffix `#{version}` to the target version.
- e.g. `https://github.com/mob-sakai/UIMaterialPropertyInjector.git?path=Packages/src#1.0.0`
- e.g. `https://github.com/mob-sakai/UIMaterialPropertyInjector.git?path=Packages/src#1.1.0`

#### Install via UPM (Manually)

Expand All @@ -95,7 +95,7 @@ _This package requires **Unity 2019.4 or later**._
```

- To update the package, change suffix `#{version}` to the target version.
- e.g. `"com.coffee.ui-material-property-injector": "https://github.com/mob-sakai/UIMaterialPropertyInjector.git?path=Packages/src#1.0.0",`
- e.g. `"com.coffee.ui-material-property-injector": "https://github.com/mob-sakai/UIMaterialPropertyInjector.git?path=Packages/src#1.1.0",`

#### Install as Embedded Package

Expand Down Expand Up @@ -201,4 +201,4 @@ Your support allows me to dedicate more time to development. 😊
* GitHub page : https://github.com/mob-sakai/UIMaterialPropertyInjector
* Releases : https://github.com/mob-sakai/UIMaterialPropertyInjector/releases
* Issue tracker : https://github.com/mob-sakai/UIMaterialPropertyInjector/issues
* Change log : https://github.com/mob-sakai/UIMaterialPropertyInjector/blob/main/CHANGELOG.md
* Change log : https://github.com/mob-sakai/UIMaterialPropertyInjector/blob/main/Packages/src/CHANGELOG.md

0 comments on commit 8fecbef

Please sign in to comment.