From cb9d3098de3a8ca609b85c8192f4d86e7f206c47 Mon Sep 17 00:00:00 2001 From: GyDi Date: Tue, 5 Apr 2022 20:21:53 +0800 Subject: [PATCH] chore: add ci --- .github/workflows/updater.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/updater.yml diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml new file mode 100644 index 0000000..0d8c057 --- /dev/null +++ b/.github/workflows/updater.yml @@ -0,0 +1,32 @@ +name: Updater CI + +on: workflow_dispatch + +jobs: + release-update: + runs-on: macos-latest + if: startsWith(github.repository, 'zzzgydi') + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Get yarn cache dir path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Yarn Cache + uses: actions/cache@v2 + id: yarn-cache + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Yarn install + run: yarn install + + - name: Release update.json + run: yarn run release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}