chore: add ci

This commit is contained in:
GyDi 2022-04-05 20:21:53 +08:00
parent c927419c99
commit cb9d3098de
No known key found for this signature in database
GPG Key ID: 1C95E0D3467B3084

32
.github/workflows/updater.yml vendored Normal file
View File

@ -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 }}