-
Notifications
You must be signed in to change notification settings - Fork 4
68 lines (62 loc) · 2 KB
/
generated.yml
File metadata and controls
68 lines (62 loc) · 2 KB
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
name: Generated code
on:
push:
branches: [main, next]
paths:
- "RelayPokedex/**"
- "RelayStarWars/**"
- "RelayTodo/**"
- "relay-compiler-language-swift/**"
- "Sources/RelayTestHelpers/StarWars/**"
- "Sources/RelayTestHelpers/ToDo/**"
pull_request:
branches: [main, next]
paths:
- "RelayPokedex/**"
- "RelayStarWars/**"
- "RelayTodo/**"
- "relay-compiler-language-swift/**"
- "Sources/RelayTestHelpers/StarWars/**"
- "Sources/RelayTestHelpers/ToDo/**"
jobs:
update_generated_code:
name: Update generated code
runs-on: macos-11
env:
DEVELOPER_DIR: /Applications/Xcode_13.0.app/Contents/Developer
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PAT_TOKEN }}
- name: Get Swift version
id: swift-version
run: |
echo "::set-output name=version::$(swift -version | shasum | cut -d' ' -f 1)"
shell: bash
- name: Cache SwiftPM dependencies
uses: actions/cache@v2
with:
path: .build
key: generated-${{ runner.os }}-spm-${{ steps.swift-version.outputs.version }}-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
generated-${{ runner.os }}-spm-${{ steps.swift-version.outputs.version }}-
- name: Cache npm dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build relay-compiler language plugin
run: |
npm ci
npm run prepublishOnly
working-directory: relay-compiler-language-swift
- name: Install node modules
run: npm ci
- name: Run relay-compiler
run: npm run relay
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update code generated by relay-compiler