-
Notifications
You must be signed in to change notification settings - Fork 5
43 lines (37 loc) · 1.44 KB
/
remove_debug_script.yml
File metadata and controls
43 lines (37 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Remove debug narrative script
on:
pull_request:
branches:
- develop
- master
- releasecandidate/*
workflow_dispatch:
jobs:
removeDebugNarrativeScript:
name: Remove debug narrative script
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PATDOCSGEN }}
- name: Generate current hash of Game.unity
run: echo "currentHash=$(find unity-ggjj/Assets/Scenes/Game.unity -type f -exec md5sum {} \; | md5sum)" >> $GITHUB_ENV
- name: Remove debug script
run: |
sed -i -E 's/_debugNarrativeScriptTextAsset.*/_debugNarrativeScriptTextAsset: {fileID: 0}/g' unity-ggjj/Assets/Scenes/Game.unity
- name: Generate new hash of Game.unity
run: echo "newHash=$(find unity-ggjj/Assets/Scenes/Game.unity -type f -exec md5sum {} \; | md5sum)" >> $GITHUB_ENV
- name: Print hashes
run: |
echo "Current: '${{ env.currentHash }}'"
echo "New: '${{ env.newHash }}'"
- name: Commit updated Game.unity
if: env.currentHash != env.newHash
run: |
git config --global user.name github-actions
git config --global user.email 'github-actions@github.com'
git add unity-ggjj/Assets/Scenes/Game.unity
git commit -am "chore(Game.unity): Remove debug script"
git push