aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/ferdi-builds.yml
blob: a2bd1298cebbaec359639671ebe5c5f5e77c3c97 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Ferdi Recipes Builds

on:
  # Push to any tracked branches
  push:
    branches: [master]
  # PRs only on master branch
  pull_request:
    branches: [master]
  # Manual trigger from the UI
  workflow_dispatch:
    inputs:
      message:
        description: 'Message for build'
        required: true

jobs:
  build:
    name: Ferdi Recipes Build
    runs-on: ubuntu-latest
    steps:
      - name: Print latest commit
        run: echo ${{ github.sha }}
      - name: Set env vars
        run: echo "PNPM_CACHE=$HOME/.pnpm-store" >> $GITHUB_ENV
      - name: Checkout code
        uses: actions/checkout@v2
      - name: Cache node modules
        uses: actions/cache@v2
        env:
          cache-name: cache-node-modules
        with:
          path: ${{ env.PNPM_CACHE }}
          key: build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
          restore-keys: |
            build-${{ env.cache-name }}-
            build-
      - name: Cache pnpm modules
        uses: actions/cache@v2
        env:
          cache-name: cache-pnpm-store
        with:
          path: ${{ env.PNPM_CACHE }}
          key: ${{ runner.os }}-16.13-build-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }}
      - name: Use Node.js 16.13.0
        uses: actions/setup-node@v2
        with:
          node-version: 16.13.0
      - name: Install pnpm
        uses: pnpm/action-setup@v2.0.1
        with:
          version: 6.19.0
      - name: Install node dependencies recursively
        run: pnpm i && pnpm run package