diff --git a/.github/workflows/setup_npm.yml b/.github/workflows/setup_npm.yml index a0d66b6..4e97bf2 100644 --- a/.github/workflows/setup_npm.yml +++ b/.github/workflows/setup_npm.yml @@ -4,11 +4,11 @@ on: workflow_call: inputs: node-version: - required: true + required: false default: '24' # >= 24 required for OIDC token support type: string npm-version: - required: true + required: false default: '11.9.0' # >= v11.5.1 required for OIDC token support type: string diff --git a/.github/workflows/setup_yarn.yml b/.github/workflows/setup_yarn.yml new file mode 100644 index 0000000..4a4e7be --- /dev/null +++ b/.github/workflows/setup_yarn.yml @@ -0,0 +1,30 @@ +name: Setup Yarn + +on: + workflow_call: + inputs: + node-version: + required: false + default: '24' + type: string + yarn-version: + required: false + default: '1.22.22' + type: string + +jobs: + setup: + name: Setup Yarn + runs-on: ubuntu-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 #v6.2.0 + with: + node-version: ${{ inputs.node-version }} + cache: "yarn" + - name: Install yarn at specific version + run: npm install -g yarn@${{ inputs.yarn-version }} + - name: Install dependencies + run: yarn install --frozen-lockfile #--frozen-lockfile ensures that the exact versions in yarn.lock are installed