Skip to content

Commit d179ad4

Browse files
committed
ci: update zkevem api package update workflow to generate meta files
1 parent cd8c935 commit d179ad4

File tree

3 files changed

+50
-7
lines changed

3 files changed

+50
-7
lines changed

.github/workflows/update-zkevm-api-package.yml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@ name: Update zkEVM API Package
44
on:
55
workflow_dispatch:
66

7+
env:
8+
GH_TOKEN: ${{ secrets.UNITY_IMMUTABLE_SDK_GITHUB_TOKEN }}
9+
710
jobs:
811
update-api:
912
runs-on: ubuntu-latest
1013
steps:
1114
- name: Check out repository
1215
uses: actions/checkout@v3
1316

17+
- name: Pull files from Git LFS
18+
run: git lfs pull
19+
1420
- name: Get current date and time
1521
id: date
1622
run: echo "::set-output name=date::$(date +'%Y-%m-%d-%H-%M-%S')"
@@ -66,13 +72,41 @@ jobs:
6672
rm openapi-generator-cli.jar
6773
rm openapi.json
6874
69-
- name: Create or update PR
75+
- name: Open sample app in Unity to generate .meta files
7076
if: steps.comparison.outputs.difference == 'true'
71-
uses: gr2m/create-or-update-pull-request-action@v1
77+
uses: game-ci/unity-test-runner@v4
7278
env:
73-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
79+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
80+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
81+
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
7482
with:
75-
title: "feat: update immutable zkEVM API package"
76-
body: "Update Immutable zkEVM API package"
77-
branch: "chore/update-zkevm-api-${{ steps.date.outputs.date }}"
78-
commit-message: "feat: update immutable zkEVM API package"
83+
unityVersion: 2021.3.26f1
84+
projectPath: './sample'
85+
githubToken: ${{ secrets.GITHUB_TOKEN }}
86+
testMode: 'EditMode'
87+
88+
- name: Create a new branch
89+
if: steps.comparison.outputs.difference == 'true'
90+
run: |
91+
git config --global user.email "[email protected]"
92+
git config --global user.name "GitHub Action"
93+
git checkout -b feat/update-zkevm-api-${{ steps.date.outputs.date }}
94+
95+
- name: Commit changes
96+
if: steps.comparison.outputs.difference == 'true'
97+
run: |
98+
git add ./src/Packages/ZkEvmApi/
99+
git commit -m "feat: update immutable zkEVM API package"
100+
101+
- name: Push changes
102+
if: steps.comparison.outputs.difference == 'true'
103+
run: |
104+
git push origin feat/update-zkevm-api-${{ steps.date.outputs.date }}
105+
106+
- name: Create pull request
107+
if: steps.comparison.outputs.difference == 'true'
108+
run: |
109+
gh pr create --title "feat: update immutable zkEVM API package" \
110+
--body "Update Immutable zkEVM API package" \
111+
--base main \
112+
--head feat/update-zkevm-api-${{ steps.date.outputs.date }}

sample/Packages/manifest.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"com.alttester.sdk": "2.1.1",
44
"com.cysharp.unitask": "2.3.3",
55
"com.immutable.passport": "file:../../src/Packages/Passport",
6+
"com.immutable.api.zkevm": "file:../../src/Packages/ZkEvmApi",
67
"com.unity.ai.navigation": "1.1.4",
78
"com.unity.ide.visualstudio": "2.0.21",
89
"com.unity.ide.vscode": "1.2.5",

sample/Packages/packages-lock.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
"dependencies": {},
1515
"url": "https://package.openupm.com"
1616
},
17+
"com.immutable.api.zkevm": {
18+
"version": "file:../../src/Packages/ZkEvmApi",
19+
"depth": 0,
20+
"source": "local",
21+
"dependencies": {
22+
"com.unity.nuget.newtonsoft-json": "3.0.2"
23+
}
24+
},
1725
"com.immutable.passport": {
1826
"version": "file:../../src/Packages/Passport",
1927
"depth": 0,

0 commit comments

Comments
 (0)