Skip to content

Merge pull request #205 from tada-team/13204-add-team-account-status #1122

Merge pull request #205 from tada-team/13204-add-team-account-status

Merge pull request #205 from tada-team/13204-add-team-account-status #1122

Workflow file for this run

---
name: Generate and deploy typescript
on: [push]
env:
CLONE_DIR: clone_dir
TYPESCRIPT_FILE: src/index.ts
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-20.04
environment: typescript_deployment
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.16'
- uses: actions/setup-node@v2
with:
node-version: '15'
- name: Clone typescript repo
uses: actions/checkout@v2
with:
repository: 'tada-team/tdproto-ts'
ssh-key: ${{ secrets.TYPESCRIPT_DEPLOY_KEY }}
ref: autogenerated
path: 'clone_dir'
- name: Generate typescript
run: |
go run ./codegen/typescript/ > "$CLONE_DIR"/"$TYPESCRIPT_FILE"
- name: Run linter
run: |
cd "$CLONE_DIR"
npm i
npm run fix
npm run check-types
npm run build
- name: Commit and upload typescript
if: github.ref == 'refs/heads/master'
run: |
cd "$CLONE_DIR"
git add --all
git config --global user.email "[email protected]"
git config --global user.name "Github Action"
git commit -m "Generate typescript on $(date)" --allow-empty
git push