Skip to content

natsuneko-laboratory/create-unitypackage

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

@natsuneko-laboratory/create-unitypackage

Create a UnityPackage on GitHub Actions, without Unity Editor

Properties

Name Type Required Description
root string No (default: cwd()) the Unity project root directory
files string[] No (default: []) the actual file paths (not meta) to include to unitypackage
files-glob string[] No (default: []) the glob patterns for actual file paths (not meta) to include to unitypackage
respect-gitignore boolean No (default: true) respect .gitignore / .npmignore file for filtering files
dest string Yes the destination path for creating unitypackage

Example

name: "Release by Tag"

on:
  push:
    tags:
      - v\d+\.\d+\.\d+
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          lfs: true

      - name: create unitypackage from files
        uses: natsuneko-laboratory/create-unitypackage@v3
        with:
          files: |
            ./Assets/NatsunekoLaboratory/MonoBehaviour.cs
            ./Assets/NatsunekoLaboratory/Resources/Logo.png
          dest: test.unitypackage

      - name: create unitypackage from glob pattern
        uses: natsuneko-laboratory/create-unitypackage@v3
        with:
          files-glob: |
            ./Assets/NatsunekoLaboratory/**/*.cs
          dest: test.unitypackage

If you want to see more examples, please check .github/workflows/action.yml.

License

MIT by @6jz