Skip to content

Commit 3142a33

Browse files
authored
Add github actions
1 parent 134d1de commit 3142a33

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/patchdata.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: PatchData Upload
2+
3+
on:
4+
# Triggers the workflow on push or pull request events but only for the master branch
5+
push:
6+
branches: [ master ]
7+
8+
jobs:
9+
PatchData:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
# Rename git folder to PatchData, zip it, upload zip and create release via GHR, rename git folder back
16+
- name: Create and upload zip
17+
run: |
18+
ls -al
19+
cd ..
20+
mv ${{ github.event.repository.name }} "PatchData"
21+
zipname="PatchData-V$((17+$GITHUB_RUN_NUMBER)).zip"
22+
echo "Saving as $zipname"
23+
zip -r $zipname ./PatchData
24+
wget -c https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_linux_amd64.tar.gz
25+
tar xfv ghr_v0.14.0_linux_amd64.tar.gz
26+
cd PatchData
27+
../ghr_v0.14.0_linux_amd64/ghr -n "Patchdata V$((17+$GITHUB_RUN_NUMBER))" -b "PatchData folder for commit ${{ github.event.head_commit.id }}. Can be used with the AM2RLauncher." Patchdata-v$((17+$GITHUB_RUN_NUMBER)) "../$zipname"
28+
mv ../PatchData ../${{ github.event.repository.name }}
29+
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)