-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (50 loc) · 1.56 KB
/
update.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
# This is a basic workflow to help you get started with Actions
name: Update API schemes
# Controls when the workflow will run
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
version:
required: true
ref:
default: master
description: TDLib repo ref (commit/tag/branch)
jobs:
update:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Checkout TDLib
uses: actions/checkout@v3
with:
repository: tdlib/td
ref: ${{ github.event.inputs.ref }}
path: td
- name: Copy td_api.tl
run: |
cp td/td/generate/scheme/td_api.tl ./td_api.tl
- uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Install dependencies
run: |
npm ci
- name: Generate scheme
run: |
npm start
- name: Delete TDLib folder
run: |
rm -rf ./td
- name: Commit changes
uses: zwaldowski/git-commit-action@v1
with:
# Commit message
commit_message: Update to ${{ github.event.inputs.version }}
- name: Tag & push
run: |
git tag v${{ github.event.inputs.version }}
git push