github.com/tada-team/tdproto@v1.51.57/.github/workflows/dart_deploy.yml (about) 1 --- 2 name: Deploy Dart 3 4 on: [push, workflow_dispatch] 5 6 env: 7 TDPROTO_DIR: tdproto 8 CLONE_DIR: clone_dir 9 10 concurrency: 11 group: ${{ github.workflow }} 12 cancel-in-progress: false 13 14 jobs: 15 build: 16 runs-on: ubuntu-20.04 17 environment: dart_deployment 18 steps: 19 - uses: actions/checkout@v2 20 with: 21 path: ${{ env.TDPROTO_DIR }} 22 - uses: actions/setup-go@v2 23 with: 24 go-version: '1.16' 25 - name: Clone tdproto_dart repo 26 uses: actions/checkout@v2 27 with: 28 repository: 'tada-team/tdproto_dart' 29 ssh-key: ${{ secrets.DART_DEPLOYMENT_KEY }} 30 ref: autogen 31 path: ${{ env.CLONE_DIR }} 32 - name: Install flutter 33 uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d 34 with: 35 flutter-version: '3.0' 36 - name: Generate Dart 37 working-directory: ${{ env.TDPROTO_DIR }} 38 run: | 39 cd ./codegen 40 chmod a+x make-dart.sh 41 ./make-dart.sh "${GITHUB_WORKSPACE}/${CLONE_DIR}/" 42 - name: Analyze flutter 43 run: | 44 cd "${GITHUB_WORKSPACE}/${CLONE_DIR}/" 45 flutter analyze --no-fatal-infos 46 - name: Commit and upload dart 47 if: github.ref == 'refs/heads/master' 48 working-directory: ${{ env.CLONE_DIR }} 49 run: | 50 git add --all 51 git config --global user.email "action@github.com" 52 git config --global user.name "Github Action" 53 git commit -m "Generate dart on $(date)" --allow-empty 54 git push