Skip to content

Commit

Permalink
Merge pull request #6 from LoveCommunity/feature/ci-cd
Browse files Browse the repository at this point in the history
CD - add CICD workflows `Publish` and `Tests`
  • Loading branch information
beeth0ven committed Dec 14, 2021
2 parents 17bd0c7 + 6e68eca commit d0add10
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Publish to Pub.dev

on:
release:
types: [published]

jobs:
publishing:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Publish
uses: k-paxian/dart-package-publisher@v1.3
with:
flutter: true
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }}
format: true
28 changes: 28 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Tests

on:
push:
branches: [main]
paths-ignore: ['**.md']
pull_request:
branches: [main]
paths-ignore: ['**.md']

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
channel: [stable, beta]

steps:
- uses: actions/checkout@v2.4.0
- uses: subosito/flutter-action@v1.5.3
with:
channel: ${{ matrix.channel }}
- run: flutter pub get
- run: flutter analyze
- run: flutter test --coverage
- name: Upload coverage reports
uses: codecov/codecov-action@v2.1.0

0 comments on commit d0add10

Please sign in to comment.