generated from ReoHakase/mystack-discord-bot
-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (86 loc) · 3.64 KB
/
root_build.yml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Build entire project (root)
on:
- pull_request
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
jobs:
# Detects if any files specified in `filter` have changed
# and sets the `app` output variable to `true` if so.
# This is used to skip the job if no files have changed.
# Refer: https://github.com/dorny/paths-filter
# filter:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# pull-requests: read
# outputs:
# # This is the output variable that is used to skip the job
# # Make sure `steps.changes.outputs.*` matches the filter name in `.github/filter.yml
# hasChanged: ${{ steps.changes.outputs.root }}
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Check for file changes
# uses: dorny/paths-filter@v2
# id: changes
# with:
# # Personal access token used to fetch a list of changed files
# # from GitHub REST API.
# # It's only used if action is triggered by a pull request event.
# # GitHub token from workflow context is used as default value.
# # If an empty string is provided, the action falls back to detect
# # changes using git commands.
# # Default: ${{ github.token }}
# token: ${{ github.token }}
# # Defines filters applied to detected changed files.
# # Each filter has a name and a list of rules.
# # Rule is a glob expression - paths of all changed
# # files are matched against it.
# # Rule can optionally specify if the file
# # should be added, modified, or deleted.
# # For each filter, there will be a corresponding output variable to
# # indicate if there's a changed file matching any of the rules.
# # Optionally, there can be a second output variable
# # set to list of all files matching the filter.
# # Filters can be provided inline as a string (containing valid YAML document),
# # or as a relative path to a file (e.g.: .github/filters.yaml).
# # Filters syntax is documented by example - see examples section.
# filters: .github/filter.yml
# Main job
build:
runs-on: ubuntu-latest
# needs: filter
# if: ${{ needs.filter.outputs.hasChanged == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
# The action will look for `volta.node` first. If `volta.node` isn't defined, then it will look for `engines.node`
# Refer: https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#node-version-file
node-version-file: 'package.json'
- name: Setup PNPM
uses: pnpm/[email protected]
id: pnpm-install
with:
# Version of pnpm to install:
# Optional when there is a packageManager field in the package.json.
# Refer: https://github.com/pnpm/action-setup#inputs
run_install: false
- name: Get PNPM store
id: pnpm-cache
run: echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup PNPM cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-pnpm-store-
- name: Install
run: pnpm install --frozen-lockfile
- name: Build with Turbo
run: pnpm turbo build
# - name: Format with Prettier
# run: pnpm turbo fmt