Skip to content

Commit

Permalink
馃殌 updated Test and Publish jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
aissat committed Jan 5, 2021
1 parent 9d3a31c commit b1e3b74
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Test and Publish

on:

push:
branches: ['*']
tags: ['v*','V*']
Expand All @@ -24,7 +23,7 @@ jobs:
channel: 'dev' # or: 'dev' or 'beta'

- name: Install packages dependencies
run: flutter packages get
run: flutter pub get

- name: Run tests
run: flutter test
Expand Down Expand Up @@ -53,23 +52,24 @@ jobs:
name: Publish
needs: [test]
runs-on: ubuntu-latest

container:
image: google/dart:latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
channel: 'dev' # or: 'dev' or 'beta'
- name: Install flutter dependencies
run: flutter pub get
- name: Install packages dependencies
run: flutter packages get
- name: Run tests
run: flutter test
- name: Run tests coverage
run: flutter test --coverage
- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v1.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v2

- name: Dry run pub publish
run: dart pub publish --dry-run || true

- name: Setup credentials
run: |
pwd
mkdir -p ~/.pub-cache
cat <<EOF> ~/.pub-cache/credentials.json
{"accessToken":"${{ secrets.OAUTH_ACCESS_TOKEN }}","refreshToken":"${{ secrets.OAUTH_REFRESH_TOKEN }}","idToken":"${{ secrets.OAUTH_ID_TOKEN }}","tokenEndpoint":"https://accounts.google.com/o/oauth2/token","scopes":["openid","https://www.googleapis.com/auth/userinfo.email"],"expiration":1609800070574}
EOF
- name: Publish pkg
run: dart pub publish --force

0 comments on commit b1e3b74

Please sign in to comment.