From 59f0307dcf5badb05f3945112e9657ffabea03c8 Mon Sep 17 00:00:00 2001 From: Ken Tandrian <60643640+KenTandrian@users.noreply.github.com> Date: Fri, 24 Jan 2025 02:10:44 +0700 Subject: [PATCH] Feature/set up GitHub action to extract locales (#4239) * Set up a GitHub action to extract locales when main branch changes * Update changelog --- .github/workflows/extract-locales.yml | 40 +++++++++++++++++++++++++++ CHANGELOG.md | 4 +++ 2 files changed, 44 insertions(+) create mode 100644 .github/workflows/extract-locales.yml diff --git a/.github/workflows/extract-locales.yml b/.github/workflows/extract-locales.yml new file mode 100644 index 00000000..c17eac5b --- /dev/null +++ b/.github/workflows/extract-locales.yml @@ -0,0 +1,40 @@ +name: Extract locales + +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +jobs: + extract_locales: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Install dependencies + run: npm ci + + - name: Extract locales + run: npm run extract-locales + + - name: Check changes + id: verify-changed-files + uses: tj-actions/verify-changed-files@v20 + + - name: Create pull request + if: steps.verify-changed-files.outputs.files_changed == 'true' + uses: peter-evans/create-pull-request@v7 + with: + author: 'github-actions[bot] ' + branch: 'feature/update-locales' + commit-message: 'Update locales' + delete-branch: true + title: 'Feature/update locales' + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index bd9c29ae..047f5a45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Added + +- Set up a _GitHub Action_ to automatically extract locales when the `main` branch changes + ### Changed - Extended the _Financial Modeling Prep_ service