name: Setup description: Setup the environment for the project inputs: working-directory: description: 'Working directory to run in, default .' required: false default: '.' download-translations: description: 'Whether to download translations as part of setup, default true' required: false default: 'true' runs: using: composite steps: - name: Install node uses: actions/setup-node@v4 with: node-version: 20 - name: Install yarn run: npm install -g yarn shell: bash if: ${{ env.ACT }} - name: Get Node version id: get-node run: echo "version=$(node -v)" >> "$GITHUB_OUTPUT" shell: bash - name: Cache uses: actions/cache@v4 id: cache with: path: ${{ format('{0}/**/node_modules', inputs.working-directory) }} key: yarn-v1-${{ runner.os }}-${{ steps.get-node.outputs.version }}-${{ hashFiles(format('{0}/**/yarn.lock', inputs.working-directory)) }} - name: Install working-directory: ${{ inputs.working-directory }} run: yarn --immutable shell: bash if: steps.cache.outputs.cache-hit != 'true' - name: Download translations uses: actions/checkout@v4 with: repository: actualbudget/translations path: ${{ inputs.working-directory }}/packages/desktop-client/locale if: ${{ inputs.download-translations == 'true' }} - name: Remove untranslated languages run: packages/desktop-client/bin/remove-untranslated-languages shell: bash if: ${{ inputs.download-translations == 'true' }}