-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (70 loc) · 2.73 KB
/
continuous_deployment.yaml
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
# name: Code Generation
# on:
# push:
# branches:
# - master
# jobs:
# bundle:
# name: Bundle & validate definition
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Setup node
# uses: actions/setup-node@v1
# with:
# node-version: 12
# - name: Install dependencies
# run: yarn --frozen-lockfile
# - name: Validate definition
# run: npm run validate:original
# - name: Bundle definition
# run: npm run bundle
# - name: Validate bundled definition
# run: npm run validate:bundled
# - name: Upload bundled definition
# uses: actions/upload-artifact@v2
# with:
# name: oanda-openapi-bundle
# path: out/definition/openapi.yaml
# if-no-files-found: error
# generate-dotnet-core:
# name: Generate .NET core client
# needs: [bundle]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Setup Java 8
# uses: actions/setup-java@v1
# with:
# java-version: 8
# - name: Setup Node 12
# uses: actions/setup-node@v1
# with:
# node-version: 12
# - name: Install dependencies
# run: yarn --frozen-lockfile
# - name: Download bundled definition
# uses: actions/download-artifact@v2
# with:
# name: oanda-openapi-bundle
# path: out/definition
# - name: Generate .NET core code
# run: npm run generate:csharp-netcore
# - name: Workaround for .NET core generation issue
# run: sudo ./scripts/remove_basevalidate.sh
# - name: Clone oanda-dotnet-client
# working-directory: ../
# run: sudo ./oanda-openapi/scripts/git_clone.sh github.com geriremenyi oanda-dotnet-client master "${{ secrets.BOT_USER_ID }}" "${{ secrets.BOT_USER_ACCESS_TOKEN }}"
# - name: Update oanda-dotnet-client
# run: |
# sudo rm -f ../oanda-dotnet-client/*.sln
# sudo rm -f ../oanda-dotnet-client/.gitignore
# sudo rm -rf ../oanda-dotnet-client/src
# sudo rm -rf ../oanda-dotnet-client/docs
# sudo cp ./out/code/csharp-netcore/*.sln ../oanda-dotnet-client
# sudo cp ./out/code/csharp-netcore/.gitignore ../oanda-dotnet-client/.gitignore
# sudo cp -r ./out/code/csharp-netcore/src ../oanda-dotnet-client/src
# sudo cp -r ./out/code/csharp-netcore/docs ../oanda-dotnet-client/docs
# - name: Publish oanda-dotnet-client
# working-directory: ../oanda-dotnet-client
# run: sudo ../oanda-openapi/scripts/git_push.sh "${{ github.event.commits[0]['message'] }}" "${{ secrets.BOT_USER_EMAIL }}" "${{ secrets.BOT_USER_NAME }}"