-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (37 loc) · 1.25 KB
/
main.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
name: Deploy
on:
push:
branches:
- master
jobs:
deploy-sample:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup git
run: |
echo "Initializing git"
git config --global user.name "Tapsell-CI"
git config --global user.email "[email protected]"
- uses: webfactory/[email protected]
with:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
ssh-private-key: ${{ secrets.ACTION_PRIVATE_KEY }}
- name: Chaning local version to global version in sample
run: |
VERSION=$(cat pubspec.yaml | grep -i 'version:' | awk '{ print $2 }')
cd example
sed -i -e "s@path: ../@ @g" pubspec.yaml
var3='tapsell_plus:'; var4="tapsell_plus: $VERSION"
sed -i -e "s@$var3@$var4@g" pubspec.yaml
cd ..
- name: Push sample
run: |
VERSION=$(cat pubspec.yaml | grep -i 'version:' | awk '{ print $2 }')
rm -rf .git
cd example
git init
git remote add example [email protected]:tapsellorg/TapsellPlusSDK-FlutterSample.git
git add -A
git commit -m "Update example with tapsell_plus:$VERSION"
git push -f example master