From 8b07a0f5822f2b966250abdbe4b273efe2af417f Mon Sep 17 00:00:00 2001 From: Misite Bao Date: Thu, 20 Oct 2022 17:51:59 +0800 Subject: [PATCH] chore: update workflows (#1977) * chore: remove useless files * chore: fix check path * chore: add workflow to auto push to crowdin after website update * fix: fix workflow config --- .github/workflows/build.yml | 36 ------------------------- .github/workflows/check_docs.yml | 3 ++- .github/workflows/push-to-crowdin.yml | 38 +++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 37 deletions(-) delete mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/push-to-crowdin.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 312ba704b..000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Build - -on: - push: - branches: [main] - pull_request: - branches: [main] - workflow_dispatch: - -jobs: - build-v2: - name: v2 Build - if: github.repository == 'wailsapp/wails' - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] - - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: "master" - submodules: true - fetch-depth: 0 - - - name: Setup Go - uses: actions/setup-go@v3 - with: - go-version: ">=1.18.0" - - - name: Build Wails CLI - run: | - cd ./v2/cmd/wails - go install - wails -help diff --git a/.github/workflows/check_docs.yml b/.github/workflows/check_docs.yml index 29c9d4d7d..770d1fcbb 100644 --- a/.github/workflows/check_docs.yml +++ b/.github/workflows/check_docs.yml @@ -16,7 +16,8 @@ jobs: id: verify-changed-files with: files: | - v2/website/*.mdx + website/**/*.mdx + website/**/*.md - name: Run step only when files change. if: steps.verify-changed-files.outputs.files_changed != 'true' diff --git a/.github/workflows/push-to-crowdin.yml b/.github/workflows/push-to-crowdin.yml new file mode 100644 index 000000000..80beeb553 --- /dev/null +++ b/.github/workflows/push-to-crowdin.yml @@ -0,0 +1,38 @@ +name: Push files to Crowdin + +on: + push: + branches: [master] + workflow_dispatch: + +jobs: + docs: + name: Push files to Crowdin + if: github.repository == 'wailsapp/wails' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Verify Changed files + uses: tj-actions/verify-changed-files@v11.1 + id: verify-changed-files + with: + files: | + website/**/*.mdx + website/**/*.md + website/**/*.json + + - name: Set node + if: steps.verify-changed-files.outputs.files_changed != 'true' + uses: actions/setup-node@v2 + with: + node-version: 16.x + + - name: Push files + env: + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} + run: | + cd website + corepack enable + pnpm install + pnpm run crowdin push -b master