Skip to content

[RPR] Most of Dawntrail support (#2028) #1

[RPR] Most of Dawntrail support (#2028)

[RPR] Most of Dawntrail support (#2028) #1

Workflow file for this run

name: Build
on:
workflow_dispatch:
inputs:
force:
description: Force i18n to be uploaded
required: false
type: boolean
push:
branches:
- dawntrail
# TODO: Consider utilising multiple workflows, and narrowing this down to a single purpose i18n job - can use push path filter to remove the complexity below, potentially.
jobs:
check_changes:
name: Check for changes
runs-on: ubuntu-latest
if: github.repository_owner == 'xivanalysis'
outputs:
i18n_changes: ${{ steps.check_changes.outputs.i18n_changes }}
steps:
- uses: actions/checkout@v2
- name: Check for changes
id: check_changes
run: |
if [ ${{ github.event_name }} == "workflow_dispatch" ]; then
export SHA="$GITHUB_SHA"
elif [ ${{ github.event_name }} == "push" ]; then
git fetch origin ${{ github.event.before }} --depth=1
export SHA="${{ github.event.before }}..${{ github.event.after }}"
else
echo "Unhandled event type: ${{ github.event_name }}"
exit 1
fi
git diff --quiet $SHA locale/en && true || echo '::set-output name=i18n_changes::true'
upload_i18n:
name: Upload i18n sources to Crowdin
runs-on: ubuntu-latest
needs: check_changes
if: needs.check_changes.outputs.i18n_changes == 'true' || inputs.force
steps:
- uses: actions/checkout@v2
- name: Install Crowdin CLI
uses: ./.github/actions/install-crowdin-cli
- name: Upload i18n sources
run: crowdin upload sources -b $GITHUB_REF_NAME --no-progress
env:
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}