Skip to content

Commit c8b2920

Browse files
authored
Merge pull request #648 from fluttercommunity/ci/auto_release_on_tag
Automate releasing to pub.dev using GitHub Actions
2 parents 3bfa0c2 + 132b737 commit c8b2920

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.github/workflows/publish.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
jobs:
8+
publish:
9+
name: Publish to pub.dev
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
17+
- name: Setup Dart
18+
uses: dart-lang/setup-dart@v1
19+
with:
20+
sdk: 2.17.0
21+
22+
- name: Download pub.dev credentials
23+
env:
24+
CREDENTIALS: ${{ secrets.PUB_DEV_CREDENTIALS }}
25+
run: |
26+
mkdir -p ~/.pub-cache
27+
echo $CREDENTIALS > ~/.pub-cache/credentials.json
28+
29+
- name: Publish
30+
run: dart pub publish -f

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: flutter_downloader test
1+
name: test
22

33
on:
44
push:

0 commit comments

Comments
 (0)