From bb2fceb4172808f859d1b85abec440a7c480ba97 Mon Sep 17 00:00:00 2001 From: Miepee <38186597+Miepee@users.noreply.github.com> Date: Sun, 5 Sep 2021 14:22:01 +0200 Subject: [PATCH] Introduce Github actions --- .github/workflows/blank.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/blank.yml diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml new file mode 100644 index 0000000..4963fae --- /dev/null +++ b/.github/workflows/blank.yml @@ -0,0 +1,31 @@ +name: PatchData Upload + +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ master ] + +jobs: + PatchData: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + # Rename git folder to PatchData, zip it, upload zip and create release via GHR, rename git folder back + - name: Create and upload zip + run: | + ls -al + cd .. + mv ${{ github.event.repository.name }} "PatchData" + zipname="PatchData-$GITHUB_RUN_NUMBER.zip" + echo "Saving as $zipname" + zip -r $zipname ./PatchData + wget -c https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_linux_amd64.tar.gz + tar xfv ghr_v0.14.0_linux_amd64.tar.gz + cd PatchData + ../ghr_v0.14.0_linux_amd64/ghr -n "Patchdata $GITHUB_RUN_NUMBER" -b "PatchData folder for commit ${{ github.event.head_commit.id }}. Can be used with the AM2RLauncher." $zipname "../$zipname" + mv ../PatchData ../${{ github.event.repository.name }} + + env: + GITHUB_TOKEN: ${{ secrets.TOKEN }}