Skip to content

Commit

Permalink
Create PR in tonapi-go repo with updated sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksej-paschenko committed Nov 8, 2023
1 parent eca4db5 commit de74964
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/create-tonapi-go-pull-request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Create a pull request to update TonAPI SDK

on:
push:
branches:
- master

jobs:
update_sdk:
name: Update TonAPI SDK
runs-on: ubuntu-latest
steps:
- name: create pull request
run: make update-sdk
env:
GH_TOKEN: ${{ github.token }}
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,18 @@ install_i18n:
git clone https://github.com/mr-tron/go-i18n/
cd go-i18n/v2 && go build -o $GOPATH/bin/goi18n github.com/nicksnyder/go-i18n/v2/goi18n
run:
go run cmd/api/main.go
go run cmd/api/main.go


TMPDIR := $(shell mktemp -d)
update-sdk:
git clone [email protected]:tonkeeper/tonapi-go.git $(TMPDIR) \
&& cp -v api/openapi.yml $(TMPDIR)/api/openapi.yml \
&& cd $(TMPDIR) \
&& git checkout -b update \
&& go generate \
&& git add . \
&& git commit -m "update sdk" \
&& git push -u origin update -f \
&& gh pr create --title "Update TonAPI SDK" --body "This PR was created automatically" --head update --base main

0 comments on commit de74964

Please sign in to comment.