0.13.0-rc.1 #437
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Upload translation files to Localazy | |
on: | |
push: | |
branches: | |
- main | |
- release/v** | |
jobs: | |
upload: | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4.2.2 | |
- name: Install Node | |
uses: actions/setup-node@v4.1.0 | |
with: | |
node-version: 20 | |
- name: Install Localazy CLI | |
run: npm install -g @localazy/cli | |
- name: Compute the Localazy branch name | |
id: branch | |
run: | | |
# This will strip the "release/" prefix if present, keeping 'main' as-is | |
echo "name=${GITHUB_REF_NAME#release/}" >> "$GITHUB_OUTPUT" | |
- name: Upload translations to Localazy | |
run: localazy upload -w "$LOCALAZY_WRITE_KEY" -b "$BRANCH" | |
env: | |
LOCALAZY_WRITE_KEY: ${{ secrets.LOCALAZY_WRITE_KEY }} | |
BRANCH: ${{ steps.branch.outputs.name }} |