mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 06:03:01 -05:00
* update workflows * update supported engines in package.json * .nvmrc * base yarn cache on node version being used rather than .nvmrc * note
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
name: Setup
|
|
|
|
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' }}
|