Skip to content

Commit 209a827

Browse files
committed
Test github actions
1 parent bad9948 commit 209a827

File tree

1 file changed

+50
-24
lines changed

1 file changed

+50
-24
lines changed

.github/workflows/main.yml

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
ls -la ..
5151
5252
- name: Show shell variables
53-
run: env | grep -v SECRET || true
53+
run: env | grep -vE 'SECRET|TOKEN|HOOK' || true
5454

5555
- name: Install Ubuntu packages
5656
run: |
@@ -78,13 +78,20 @@ jobs:
7878
run: for a in build/bin/*.native ; do ls -l $a ; strip $a ; ls -l $a ; done
7979

8080
- name: Test run of MEGA65 emulator
81+
run: build/bin/xmega65.native -h || true
82+
83+
- name: Creating DEB package to be deployed
84+
if: env.should_deploy == 'true'
8185
run: |
82-
build/bin/xmega65.native -v || true
83-
build/bin/xmega65.native -h || true
86+
make RELEASE=yes OFFICIALBUILD=yes deb
87+
cp build/bin/*.deb build/bin/*.rpm .
88+
ls -l *.deb *.rpm
8489
85-
- name: Creating DEB distribution
90+
- name: GIT configuration for deployment
8691
if: env.should_deploy == 'true'
87-
run: make RELEASE=yes OFFICIALBUILD=yes deb
92+
run: |
93+
git config --global user.name "GitHub Actions Xemu Linux Builder"
94+
git config --global user.email "[email protected]"
8895
8996
- name: Installing Windows SDL2 cross-development components
9097
run: build/install-cross-win-mingw-sdl-on-linux.sh /usr/bin
@@ -119,15 +126,25 @@ jobs:
119126
if: env.should_deploy == 'true'
120127
run: for a in build/bin/*.win32 ; do ls -l $a ; i686-w64-mingw32-strip $a ; ls -l $a ; done
121128

122-
- name: Deployment
129+
- name: Create packages to be deployed
123130
if: env.should_deploy == 'true'
124131
run: |
125-
git config --global user.name "GitHub Actions Xemu Builder"
126-
git config --global user.email "[email protected]"
132+
cp README.md LICENSE AUTHORS build/bin/
133+
echo "--- Bulding ZIP acrhive ---"
134+
build/zipper.sh build/bin xemu-binaries-osx.zip build/bin/*.dylib build/bin/*.native README.md LICENSE AUTHORS
135+
cp build/bin/xemu-binaries-osx.zip .
136+
ls -l *.zip
137+
echo "--- Creating DMG distribution ---"
138+
build/dmg-osx-creator.sh
139+
echo "--- Before deploy ---"
140+
build/deploy/before-deploy.sh xemu-deploy MacOS
127141
142+
- name: Deployment
143+
if: env.should_deploy == 'truex'
144+
run: |
128145
# Clone shared deployment repo
129146
rm -rf /tmp/shared-deploy-repo
130-
git clone --depth 1 --branch main https://x-access-token:${{ secrets.DEPLOY_TOKEN }}@github.com/lgblgblgb/shared-deploy-repo.git /tmp/shared-deploy-repo
147+
git clone --depth 1 --branch main https://x-access-token:${{ secrets.XEMU_DEPLOY_TOKEN }}@github.com/lgblgblgb/shared-deploy-repo.git /tmp/shared-deploy-repo
131148
132149
# Clear and replace linux folder
133150
rm -rf /tmp/shared-deploy-repo/linux
@@ -166,7 +183,7 @@ jobs:
166183
ls -la ..
167184
168185
- name: Show shell variables
169-
run: env | grep -v SECRET || true
186+
run: env | grep -Ev 'SECRET|TOKEN|HOOK' || true
170187

171188
- name: Install build/deployment dependencies
172189
run: build/install-dependencies-osx.sh
@@ -189,35 +206,44 @@ jobs:
189206
run: for a in build/bin/*.native ; do build/mangle_dylib_osx.sh $a ; strip $a ; ls -l $a ; done
190207

191208
- name: Test run of MEGA65 emulator
192-
run: |
193-
build/bin/xmega65.native -v || true
194-
build/bin/xmega65.native -h || true
209+
run: build/bin/xmega65.native -h || true
195210

196-
- name: Pre-deployment
211+
- name: Create packages to be deployed
197212
if: env.should_deploy == 'true'
198213
run: |
199214
cp README.md LICENSE AUTHORS build/bin/
215+
echo "--- Bulding ZIP acrhive ---"
200216
build/zipper.sh build/bin xemu-binaries-osx.zip build/bin/*.dylib build/bin/*.native README.md LICENSE AUTHORS
201217
cp build/bin/xemu-binaries-osx.zip .
202-
ls -l
218+
ls -l *.zip
219+
echo "--- Creating DMG distribution ---"
203220
build/dmg-osx-creator.sh
221+
echo "--- Before deploy ---"
204222
build/deploy/before-deploy.sh xemu-deploy MacOS
205223
206-
- name: Deployment
224+
- name: GIT configuration for deployment
207225
if: env.should_deploy == 'true'
208226
run: |
209-
git config --global user.name "GitHub Actions Xemu Builder"
227+
git config --global user.name "GitHub Actions Xemu Mac Builder"
210228
git config --global user.email "[email protected]"
211-
rm -rf /tmp/deploy-repo
212-
git clone --depth 1 --branch binary-osx-${GITHUB_REF##*/} https://x-access-token:${{ secrets.DEPLOY_TOKEN }}@github.com/lgblgblgb/xemu-binaries.git /tmp/deploy-repo
213-
rm -fr /tmp/deploy-repo/*
214-
cp xemu-deploy/* /tmp/deploy-repo/
215-
cd /tmp/deploy-repo
229+
230+
- name: Deployment
231+
if: env.should_deploy == 'true'
232+
run: |
233+
rm -rf xemu-deploy-orig-repo
234+
git clone --depth 1 --branch binary-osx-${GITHUB_REF##*/} https://x-access-token:${{ secrets.XEMU_DEPLOY_TOKEN }}@github.com/lgblgblgb/xemu-binaries.git xemu-deploy-orig-repo
235+
mv xemu-deploy-orig-repo/.git* xemu-deploy/
236+
rm -fr xemu-deploy-orig-repo
237+
cd xemu-deploy
238+
pwd
239+
touch .nojekyll
216240
ls -l
217-
git add *
241+
git add .
242+
git status
218243
git commit -m "MacOS deployment from $GITHUB_REPOSITORY ($GITHUB_SHA)"
219244
git push --force
245+
cd ..
220246
221-
- name: Deploy announcement
247+
- name: Announce deployment
222248
if: env.should_deploy == 'true'
223249
run: echo "TODO" ; pwd

0 commit comments

Comments
 (0)