From 6ef862daa99a7402e4aa9ef23be8cb708689911d Mon Sep 17 00:00:00 2001 From: Aria Moradi Date: Thu, 2 Sep 2021 14:21:07 +0430 Subject: [PATCH] sync tree with b795913c9eb96eecebc6909cf8bf6179c401efa4 --- .gitattributes | 28 -------------------- .github/build_push.yml | 60 ++++++++++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ 3 files changed, 62 insertions(+), 28 deletions(-) delete mode 100644 .gitattributes create mode 100644 .github/build_push.yml diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index f529071c..00000000 --- a/.gitattributes +++ /dev/null @@ -1,28 +0,0 @@ -* text=auto -* text eol=lf - -# Windows forced line-endings -/.idea/* text eol=crlf -*.bat text eol=crlf -*.ps1 text eol=crlf - -# Gradle wrapper -*.jar binary - -# Binary files types -*.webp binary -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.gz binary -*.zip binary -*.7z binary -*.ttf binary -*.eot binary -*.woff binary -*.pyc binary -*.swp binary -*.pdf binary -*.exe binary \ No newline at end of file diff --git a/.github/build_push.yml b/.github/build_push.yml new file mode 100644 index 00000000..79bfa3ea --- /dev/null +++ b/.github/build_push.yml @@ -0,0 +1,60 @@ +name: CI build + +on: + push: + branches: + - master + + build: + name: Build artifacts and deploy preview + needs: check_wrapper + if: "!startsWith(github.event.head_commit.message, '[SKIP CI]')" + runs-on: ubuntu-latest + + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.9.0 + with: + access_token: ${{ github.token }} + + - name: Checkout master branch + uses: actions/checkout@v2 + with: + ref: master + path: master + fetch-depth: 0 + + - name: Build webUI + run: | + cd master + yarn build + cd build + zip -9 -r "../Tachidesk-WebUI-r$(git rev-list HEAD --count)" * + + - name: Generate Tag Name + id: GenTagName + run: | + cd master/build + genTag="r$(git rev-list HEAD --count)" + echo "$genTag" + echo "::set-output name=value::$genTag" + + - name: Create Tag + run: | + TAG="${{ steps.GenTagName.outputs.value }}" + echo "tag: $TAG" + cd master + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + + git tag $TAG + git push origin $TAG + + - name: Upload CI Release + uses: ncipollo/release-action@v1 + with: + token: ${{ secrets.DEPLOY_PREVIEW_TOKEN }} + artifacts: "master/*.zip" + owner: "Suwayomi" + repo: "Tachidesk-WebUI-preview" + tag: ${{ steps.GenTagName.outputs.value }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index ac57da47..c333f229 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ node_modules/ .eslintcache .vscode .env + +build/* \ No newline at end of file