Skip to content

POEditor Locales

POEditor Locales #1554

Workflow file for this run

name: POEditor Locales
on:
schedule:
- cron: "0 0 * * *"
jobs:
Download:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20.x']
steps:
- uses: actions/checkout@v4
with:
# fetch full history so things like auto-changelog work properly
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
# setting a registry enables the NODE_AUTH_TOKEN env variable where we can set an npm token. REQUIRED
registry-url: 'https://registry.npmjs.org'
- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: install locale tools
run: |
npm install grunt-cli --save-dev
- name: Create BuildConfig File
uses: jsdaniell/[email protected]
with:
name: "BuildConfig.json"
json: '{"POEditor": { "id": "77079", "token": "${{ secrets.POEDITOR_TOKEN }}"}}'
- name: Download locales from POEditor
run: npm run locale-download
- name: Push changes to ${{ steps.package-version.outputs.current-version}} locale branch
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: 'locale/${{ steps.package-version.outputs.current-version}}'
delete-branch: true
labels: Localization
milestone: ${{ steps.package-version.outputs.current-version}}
title: "${{ steps.package-version.outputs.current-version}} POEditor Update - ${{ steps.date.outputs.date }}"
commit-message: 'Locale Gen & Download on ${{ steps.date.outputs.date }}'