diff --git a/.github/workflows/Typecho-dev-Build.yml b/.github/workflows/Typecho-dev-Build.yml new file mode 100644 index 00000000..2a7a94d9 --- /dev/null +++ b/.github/workflows/Typecho-dev-Build.yml @@ -0,0 +1,33 @@ +name: Typecho Dev Build + +on: + push: + branches: + - master + +jobs: + build: + name: Typecho Build + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'skip ci')" + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Install tree + run: sudo apt-get -y install tree + - name: Build + run: | + mkdir build + cp -r LICENSE.txt *.php admin install usr var build/ + mkdir build/usr/uploads/ + chmod 777 build/usr/uploads/ + rm -rf build/admin/src + tree -d build + - name: Upload a Build Artifact + uses: actions/upload-artifact@v2 + with: + name: typecho + path: ./build/ + - name: Trigger build + run: | + curl -XPOST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/typecho/languages/actions/workflows/update.yml/dispatches --data '{"ref": "master"}' diff --git a/.github/workflows/Typecho-dev-Ci.yml b/.github/workflows/Typecho-dev-Ci.yml index 7ea60cb6..d0fce759 100644 --- a/.github/workflows/Typecho-dev-Ci.yml +++ b/.github/workflows/Typecho-dev-Ci.yml @@ -1,4 +1,4 @@ -name: Typecho Build Dev Ci +name: Typecho Dev Test on: push: @@ -27,28 +27,4 @@ jobs: - name: Test run: | find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) - build: - name: Typecho Build - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip ci')" - steps: - - name: Checkout code - uses: actions/checkout@v2 - - name: Install tree - run: sudo apt-get -y install tree - - name: Build - run: | - mkdir build - cp -r LICENSE.txt *.php admin install usr var build/ - mkdir build/usr/uploads/ - chmod 777 build/usr/uploads/ - rm -rf build/admin/src - tree -d build - - name: Upload a Build Artifact - uses: actions/upload-artifact@v2 - with: - name: typecho - path: ./build/ - - name: Trigger build - run: | - curl -XPOST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/typecho/languages/actions/workflows/update.yml/dispatches --data '{"ref": "master"}' +