Skip to content

Commit

Permalink
feat: Update to use models-lib generator (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickevansuk authored Mar 3, 2021
1 parent 967f655 commit b4df957
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/create-data-model-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,30 @@ jobs:
uses: actions/checkout@v2
with:
ref: master
path: OpenActive.NET

- name: Setup Node.js 12.x
- name: Checkout models-lib
uses: actions/checkout@v2
with:
repository: openactive/models-lib
path: models-lib

- name: Setup Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install OpenActive.NET.Generator
node-version: 14.x

- name: Install models-lib
run: npm install
working-directory: OpenActive.NET.Generator
- name: Update OpenActive.NET.Generator
working-directory: models-lib

- name: Update models-lib with latest data-models
run: npm update @openactive/data-models
working-directory: OpenActive.NET.Generator
working-directory: models-lib

- name: Run OpenActive.NET.Generator
run: npm start
working-directory: OpenActive.NET.Generator
- name: Run .NET models generator
run: npm start -- generate .NET --destination ../OpenActive.NET/OpenActive.NET/
working-directory: models-lib

- name: Restore OpenActive.NET/models/SportsActivityLocation.cs (Gladstone workaround)
run: git checkout OpenActive.NET/models/SportsActivityLocation.cs
Expand All @@ -39,6 +46,7 @@ jobs:
id: cpr
uses: peter-evans/create-pull-request@v3
with:
path: OpenActive.NET
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
commit-message: Update data models
committer: openactive-bot <[email protected]>
Expand Down

0 comments on commit b4df957

Please sign in to comment.