@@ -10,48 +10,42 @@ jobs:
1010 steps :
1111
1212 - name : 📥 Checkout repository
13- uses : actions/checkout@v2
13+ uses : actions/checkout@v4
1414
1515 # things to be cached/restored:
1616
1717 - name : 💾 Cache stack global package db
1818 id : stack-global
19- uses : actions/cache@v2
19+ uses : actions/cache@v3
2020 with :
2121 path : ~/.stack
2222 key : ${{ runner.os }}-stack-global-after20210110-${{ hashFiles('**.yaml') }}
2323 restore-keys : |
2424 ${{ runner.os }}-stack-global-after202110110
25+
2526 - name : 💾 Cache stack-installed programs in ~/.local/bin
2627 id : stack-programs
27- uses : actions/cache@v2
28+ uses : actions/cache@v3
2829 with :
2930 path : ~/.local/bin
3031 key : ${{ runner.os }}-stack-programs-${{ hashFiles('**.yaml') }}
3132 restore-keys : |
3233 ${{ runner.os }}-stack-programs
34+
3335 - name : 💾 Cache .stack-work
34- uses : actions/cache@v2
36+ uses : actions/cache@v3
3537 with :
3638 path : .stack-work
3739 key : ${{ runner.os }}-stack-work-${{ hashFiles('**.yaml') }}
3840 restore-keys : |
3941 ${{ runner.os }}-stack-work
4042
41- - name : 💾 Cache agda-language-server/.stack-work
42- uses : actions/cache@v2
43- with :
44- path : agda-language-server/.stack-work
45- key : ${{ runner.os }}-agda-language-server-stack-work-${{ hashFiles('agda-language-server/package.yaml') }}
46- restore-keys : |
47- ${{ runner.os }}-agda-language-server-stack-work
48-
4943 # actions:
5044
5145 - name : ⏬ Install stack
5246 run : |
5347 mkdir -p ~/.local/bin
54- export PATH=~/.local/bin:$PATH
48+ export PATH=~/.local/bin:$PATH
5549 # brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
5650 if [[ ! -x ~/.local/bin/stack ]]; then brew install gnu-tar; curl -sL https://get.haskellstack.org/stable/osx-x86_64.tar.gz | gtar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
5751 stack --version
@@ -71,10 +65,10 @@ jobs:
7165 - name : 🔗 Bundle ICU4C DLLs
7266 run : | # Bundle icu4c DLLs
7367
74- # see if icu4c has been installed
68+ # see if icu4c has been installed
7569 if [ "$(brew list | grep icu4c)" = "" ]
7670 then
77- echo "installing icu4c"
71+ echo "installing icu4c"
7872 brew install icu4c
7973 fi
8074
@@ -84,12 +78,12 @@ jobs:
8478 # find the path of "als"
8579 executable=$(find "$(stack path --local-install-root)"/bin -name "als")
8680
87- # remove the old dylib, and make a new one
81+ # remove the old dylib, and make a new one
8882 rm -rf dylib
89- mkdir dylib
83+ mkdir dylib
9084
9185 ################################################################################
92- # icuuc
86+ # icuuc
9387 ################################################################################
9488
9589 icuuc_id=$(otool -L "$executable" | grep icuuc | awk '{print $1}')
10397 cp "$icuuc_path" "$icuuc_path_new"
10498
10599 # change icuuc's ID referenced by ALS
106- install_name_tool -change "$icuuc_id" "$icuuc_id_new" "$executable"
100+ install_name_tool -change "$icuuc_id" "$icuuc_id_new" "$executable"
107101
108102 echo "icuuc referenced by ALS"
109103 echo " old ID : $icuuc_id"
@@ -112,7 +106,7 @@ jobs:
112106 echo " new path: $icuuc_path_new"
113107
114108 ################################################################################
115- # icui18n
109+ # icui18n
116110 ################################################################################
117111
118112 icui18n_id=$(otool -L "$executable" | grep icui18n | awk '{print $1}')
@@ -126,7 +120,7 @@ jobs:
126120 cp "$icui18n_path" "$icui18n_path_new"
127121
128122 # change icui18n's ID referenced by ALS
129- install_name_tool -change "$icui18n_id" "$icui18n_id_new" "$executable"
123+ install_name_tool -change "$icui18n_id" "$icui18n_id_new" "$executable"
130124
131125 echo "icui18n referenced by ALS"
132126 echo " old ID : $icui18n_id"
@@ -135,7 +129,7 @@ jobs:
135129 echo " new path: $icui18n_path_new"
136130
137131 ################################################################################
138- # icudata
132+ # icudata
139133 ################################################################################
140134
141135 # otool -L "$icui18n_id" | grep icudata | awk '{print $1}'
@@ -160,21 +154,21 @@ jobs:
160154 id : zip
161155 run : |
162156 # locate the data-dir
163- datadir=$(find $(stack path --snapshot-install-root)/share -type d -name "Agda-*")
164-
165- # locate the executable
166- executable=$(find $(stack path --local-install-root)/bin -name "als")
157+ datadir=$(find " $(stack path --snapshot-install-root)/share" -type d -name "Agda-*")
158+
159+ # locate the executable
160+ executable=$(find " $(stack path --local-install-root)/bin" -name "als")
167161
168162 # make a temporary directory for compresssing
169163 mkdir zip
170- cp -r $datadir zip/data
164+ cp -r " $datadir" zip/data
171165 cp -r dylib zip/dylib
172- cp $executable zip/
173-
166+ cp " $executable" zip/
167+
174168 # compress
175- cd zip
176- zip -r als-macos.zip *
177- cd ..
169+ cd zip
170+ zip -r als-macos.zip ./ *
171+ cd ..
178172 mv zip/als-macos.zip .
179173
180174 - name : 🚢 Release Artifacts
@@ -185,4 +179,4 @@ jobs:
185179 draft : true
186180 prerelease : true
187181 env :
188- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
182+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments