-
Notifications
You must be signed in to change notification settings - Fork 18
executable file
·63 lines (53 loc) · 1.76 KB
/
codegen1.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
name: codegen
on:
push:
branches-ignore:
- '**'
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: '20'
# Restore the yarn cache
- uses: c-hive/gha-yarn-cache@v1
- name: Yarn install
run: yarn install
- name: Yarn Compile
run: yarn compile
- uses: actions/checkout@v2
with:
repository: ethersphere/go-sw3-abi
path: go
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
ref: master
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- name: Commit files
run: |
mkdir -p go/sw3abi
./codegen/go1.sh "go/sw3abi/abi_${{steps.tag.outputs.tag}}.go" "${{steps.tag.outputs.tag}}"
cd go
git config --local user.email "[email protected]"
git config --local user.name "bee-worker"
git add .
git commit -m "generate code for sw3 contracts ${{steps.tag.outputs.tag}}" -a
git tag "${{steps.tag.outputs.tag}}"
- name: Push changes
uses: ad-m/github-push-action@master
with:
repository: ethersphere/go-sw3-abi
directory: go
github_token: ${{ secrets.GHA_PAT_BASIC }}
branch: master
tags: true