Skip to content

Commit

Permalink
Merge pull request #648 from fluttercommunity/ci/auto_release_on_tag
Browse files Browse the repository at this point in the history
Automate releasing to pub.dev using GitHub Actions
  • Loading branch information
bartekpacia committed May 23, 2022
2 parents 3bfa0c2 + 132b737 commit c8b2920
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: publish

on:
push:
tags: ["v*"]

jobs:
publish:
name: Publish to pub.dev

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 2.17.0

- name: Download pub.dev credentials
env:
CREDENTIALS: ${{ secrets.PUB_DEV_CREDENTIALS }}
run: |
mkdir -p ~/.pub-cache
echo $CREDENTIALS > ~/.pub-cache/credentials.json
- name: Publish
run: dart pub publish -f
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: flutter_downloader test
name: test

on:
push:
Expand Down

0 comments on commit c8b2920

Please sign in to comment.