{"id":20139408,"url":"https://github.com/mackysoft/unity-githubactions-build-example","last_synced_at":"2025-04-09T18:22:35.331Z","repository":{"id":111399656,"uuid":"356841084","full_name":"mackysoft/Unity-GitHubActions-Build-Example","owner":"mackysoft","description":"An example of building a project using Unity and GitHub Actions.","archived":false,"fork":false,"pushed_at":"2021-04-12T08:25:17.000Z","size":27,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T20:22:40.468Z","etag":null,"topics":["build","ci","example","github-actions","tutorial","unity"],"latest_commit_sha":null,"homepage":"https://qiita.com/makihiro_dev/items/03208a83d4c3a1fb426b","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mackysoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-11T10:49:42.000Z","updated_at":"2024-01-05T13:16:40.000Z","dependencies_parsed_at":"2023-05-18T15:02:44.402Z","dependency_job_id":null,"html_url":"https://github.com/mackysoft/Unity-GitHubActions-Build-Example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackysoft%2FUnity-GitHubActions-Build-Example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackysoft%2FUnity-GitHubActions-Build-Example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackysoft%2FUnity-GitHubActions-Build-Example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackysoft%2FUnity-GitHubActions-Build-Example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mackysoft","download_url":"https://codeload.github.com/mackysoft/Unity-GitHubActions-Build-Example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085769,"owners_count":21045209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["build","ci","example","github-actions","tutorial","unity"],"created_at":"2024-11-13T21:45:11.357Z","updated_at":"2025-04-09T18:22:35.320Z","avatar_url":"https://github.com/mackysoft.png","language":null,"readme":"﻿# Unity-GitHubActions-Build-Example\n \n[![Build](https://github.com/mackysoft/Unity-GitHubActions-Build-Example/actions/workflows/build.yaml/badge.svg?branch=main)](https://github.com/mackysoft/Unity-GitHubActions-Build-Example/actions/workflows/build.yaml)\n\nAn example of building a project using Unity and GitHub Actions.\n\n\u003e Qiita: [UnityとGitHubActionsを使って自動ビルドする【複数プラットフォーム同時ビルド】](https://qiita.com/makihiro_dev/items/03208a83d4c3a1fb426b)\n\n\n## 🔰 Tutorial\n\n### 1. Prepare your project repository\n\nPrepare a repository for the Unity project that contains the tests.\n\n\n### 2. Acquire ULF\n\nAcquire the ULF file to activate your Unity license.\nUse the following tool to acquire the ULF file.\n\nhttps://github.com/mackysoft/Unity-ManualActivation\n\n\n### 3. Register ULF to Secrets\n\n1. Select the `Settings \u003e Secrets` menu in the project repository.\n2. Click the `New repository secret` button.\n3. Enter \"UNITY_LICENSE\" in Name and copy and paste the contents of the ULF file in Value.\n4. Click the `Add secret` button.\n\nYou can now treat the contents of the ULF file as an environment variable while keeping its contents private.\n\n\n### 4. Write the YAML to build on GitHub Actions.\n\nCreate a `build.yaml` under the `.github/workflows/` folder of the repository, and write the following.\n\n```yaml:build.yaml\nname: Build\n\non:\n  pull_request: {}\n  push: { branches: [main] }\n\njobs:\n  build:\n    name: ${{ matrix.targetPlatform }}\n    runs-on: ubuntu-latest\n    strategy:\n      fail-fast: false\n      matrix:\n        targetPlatform:\n          - StandaloneOSX # Build a macOS standalone (Intel 64-bit).\n          - StandaloneWindows # Build a Windows standalone.\n          - StandaloneWindows64 # Build a Windows 64-bit standalone.\n          - StandaloneLinux64 # Build a Linux 64-bit standalone.\n          - iOS # Build an iOS player.\n          - Android # Build an Android .apk standalone app.\n          - WebGL # WebGL.\n\n    steps:\n      # Checkout\n      - name: Checkout\n        uses: actions/checkout@v2\n        with:\n          fetch-depth: 0\n          lfs: true\n\n      # Cache\n      - name: Cache\n        uses: actions/cache@v2\n        with:\n          path: Library\n          key: Library-${{ matrix.targetPlatform }}\n          restore-keys: Library-\n\n      # Build\n      - name: Build\n        uses: game-ci/unity-builder@v2\n        env:\n          UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}\n        with:\n          targetPlatform: ${{ matrix.targetPlatform }}\n\n      # Upload Build\n      - name: Upload Build\n        uses: actions/upload-artifact@v2\n        with:\n          name: Build-${{ matrix.targetPlatform }}\n          path: build/${{ matrix.targetPlatform }}\n```\n\n\n### 5. Build\n\n1. Push or Pull Request to the repository and run the workflow to build the project.\n2. Wait for the workflow to complete.\n\nIf you see a ✔ mark as shown below, you have succeeded.\n\n![BuildResult](https://user-images.githubusercontent.com/13536348/114309797-70967000-9b23-11eb-9f02-bf50925c825b.jpg)\n\nYou can download the built artifacts from Artifacts in the upper right corner.\n\n\n#  📔 Author Info\n\nHiroya Aramaki is a indie game developer in Japan.\n\n- Blog: [https://mackysoft.net/blog](https://mackysoft.net/blog)\n- Twitter: [https://twitter.com/makihiro_dev](https://twitter.com/makihiro_dev)\n\n\n#  📜 License\n\nThis repository is under the MIT License.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackysoft%2Funity-githubactions-build-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmackysoft%2Funity-githubactions-build-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackysoft%2Funity-githubactions-build-example/lists"}