Skip to content

Commit c6c582d

Browse files
authored
Merge pull request #115 from appwrite/feat-automated-publish
Added pub.dev automation
2 parents 40d3019 + 03f7f97 commit c6c582d

File tree

8 files changed

+104
-0
lines changed

8 files changed

+104
-0
lines changed

src/SDK/Language/Dart.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,12 @@ public function getFiles()
317317
'template' => '/dart/docs/example.md.twig',
318318
'minify' => false,
319319
],
320+
[
321+
'scope' => 'default',
322+
'destination' => '.travis.yml',
323+
'template' => '/dart/.travis.yml.twig',
324+
'minify' => false,
325+
],
320326
];
321327
}
322328
}

src/SDK/Language/Flutter.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,12 @@ public function getFiles()
9191
'template' => '/flutter/docs/example.md.twig',
9292
'minify' => false,
9393
],
94+
[
95+
'scope' => 'default',
96+
'destination' => '.travis.yml',
97+
'template' => '/flutter/.travis.yml.twig',
98+
'minify' => false,
99+
],
94100
];
95101
}
96102
}

src/SDK/Language/Python.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,12 @@ public function getFiles()
170170
'template' => '/python/docs/example.md.twig',
171171
'minify' => false,
172172
],
173+
[
174+
'scope' => 'default',
175+
'destination' => '.travis.yml',
176+
'template' => '/python/.travis.yml.twig',
177+
'minify' => false,
178+
],
173179
];
174180
}
175181

src/SDK/Language/Ruby.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,12 @@ public function getFiles()
148148
'template' => '/ruby/docs/example.md.twig',
149149
'minify' => false,
150150
],
151+
[
152+
'scope' => 'default',
153+
'destination' => '.travis.yml',
154+
'template' => '/ruby/.travis.yml.twig',
155+
'minify' => false,
156+
],
151157
];
152158
}
153159

templates/dart/.travis.yml.twig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: dart
2+
3+
dart: stable
4+
5+
os: linux
6+
7+
install:
8+
- mkdir -p ~/.pub-cache
9+
- |
10+
cat <<EOF > ~/.pub-cache/credentials.json
11+
{
12+
"accessToken":"$PUB_ACCESS_TOKEN",
13+
"refreshToken":"$PUB_REFRESH_TOKEN",
14+
"tokenEndpoint":"$PUB_TOKEN_EDNPOINT",
15+
"scopes":["https://www.googleapis.com/auth/plus.me","https://www.googleapis.com/auth/userinfo.email"],
16+
"expiration":$PUB_EXPIRATION
17+
}
18+
19+
deploy:
20+
provider: script
21+
skip_cleanup: true
22+
script: pub publish -f
23+
on:
24+
tags: true

templates/flutter/.travis.yml.twig

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
language: dart
2+
3+
dart: stable
4+
5+
os: linux
6+
7+
install:
8+
- mkdir -p ~/.pub-cache
9+
- |
10+
cat <<EOF > ~/.pub-cache/credentials.json
11+
{
12+
"accessToken":"$PUB_ACCESS_TOKEN",
13+
"refreshToken":"$PUB_REFRESH_TOKEN",
14+
"tokenEndpoint":"$PUB_TOKEN_EDNPOINT",
15+
"scopes":["https://www.googleapis.com/auth/plus.me","https://www.googleapis.com/auth/userinfo.email"],
16+
"expiration":$PUB_EXPIRATION
17+
}
18+
19+
deploy:
20+
provider: script
21+
skip_cleanup: true
22+
script: pub publish -f
23+
on:
24+
tags: true

templates/python/.travis.yml.twig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: python
2+
3+
python:
4+
- "3.8"
5+
6+
jobs:
7+
include:
8+
- stage: pypi release
9+
python: "3.8"
10+
script: echo "Deploying to pypi ..."
11+
deploy:
12+
provider: pypi
13+
username: "__token__"
14+
password: $PYPI_TOKEN
15+
on:
16+
tags: true

templates/ruby/.travis.yml.twig

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: ruby
2+
3+
rvm:
4+
- 2.7
5+
6+
jobs:
7+
include:
8+
- stage: ruby gems release
9+
rvm: "2.7"
10+
script: echo "Deploying to ruby gems ..."
11+
deploy:
12+
provider: rubygems
13+
api_key: $RUBYGEMS_TOKEN
14+
gem: {{spec.title | caseLower | caseSnake}}
15+
on:
16+
tags: true

0 commit comments

Comments
 (0)